Most voted "rstudio" questions
Rstudio is a free and open source (IDE) integrated development environment for R
Learn more…175 questions
Sort by count of
-
3
votes0
answers169
viewsHow to change the title, caption, filter and export the Map in pdf using leaflet in R?
I created a map of MG to identify the Qtde of consultations by mining municipality. I got the code below on the internet and it worked. But I would like to add some more information, but I’m not…
-
3
votes1
answer192
viewsHow to improve R output
Is there a package or way to make more visual the output of regressions in R? Something that leaves information more organized, similar to Stata and E-views.
-
3
votes1
answer86
viewsHow to make the output of the Kable() command appear in Rstudio Viewer?
I’m trying to get a Latex table with the knitr package R, but I’m not getting the output to appear on Rstudio Viewer. For example, when trying to convert head(mtcars): kable(mtcars, "latex") I get…
-
3
votes1
answer62
viewsHow to plot negative coordinates (South Pole) using ggmap, ggplot?
I’m trying to plot some points between South America and the Antarctic Peninsula, but from the error when I delimit the area I wish to appear on the map (xlim, ylim). I had already plotted the map…
-
3
votes0
answers250
viewsSums and Dynamic table by R
I need to do a calculation in Rstudio that is at first simple to do in excel. We have a table with two columns, one with occupation codes (Occupation Column), and another column with two codes for…
-
3
votes1
answer438
viewsHow to increase Y-axis scale marks in graphics in ggplot2?
I have a chart with very long scale marks between you, I’d like to increase the amount, but I don’t know how it’s possible. I would like to increase the number of values in the Y axis, for example,…
-
2
votes1
answer5140
viewsLoading Rdata files from the file directory itself . R
How to load Rdata files that are in the same directory as the file . R, in Rstudio? Here, for example, is the line: load('teste.RData') When loaded, it returns... Erro em readChar(con, 5L, useBytes…
-
2
votes0
answers1281
viewsError while initializing Rstudio
By initializing Rstudio I come across the following "ERROR", package-related "manipulate" and "rstudio": Error installing package: * installing *source* package 'rstudio' ... Aviso em file(file,…
-
2
votes1
answer661
viewsHow to join Bibtex files in R
How can I join multiple extension files .bib in a single file on the R? I’m learning to use the Bibliometrix package, and I need to put together 99 files .bib to a single file. Thank you, guys.…
-
2
votes1
answer88
viewsGithub pages and rstudio
I’m using the Rstudio to create my documents in the format .Rmd and address in .md with the following function: rmarkdown::render("2016-09-07-post1.Rmd",output_format = "md_document",encoding =…
-
2
votes1
answer1347
viewsHow to check if a column(variable) exists within a 'data.frame'?
I need to check if there are columns (i.e., variables) inside a data.frame before doing any operation, but the past variable is not in string to compare with the colnames or names. Follows the code:…
-
2
votes0
answers69
viewsThe use of square root in Edger via Rstudio
I wonder if anyone ever tried to use sqrt in the edgeR via Rstudio to increase your N and significance. I was having some problems with my reads (RefSeq) like Ns low and low differential expression…
-
2
votes2
answers1801
viewsHow to join two csv files in R?
my problem is the following: I have two data files in csv format with same number of columns and same column names (see below). I ask to read the files as follows: > dados_1 <-…
-
2
votes0
answers61
viewsHow to add more data to a spreadsheet using R?
I am doing a work of Bioinformatics using patient data, each patient has a code and this work was divided among other colleagues also, each one got a part. Well, I need to attach the parts of them,…
-
2
votes2
answers1628
viewsI want to generate an R table for Latex
I want to generate a table with the R Summary data with the results I got, I know there’s a library called Stargazer that does, but I couldn’t find the documentation.
-
2
votes2
answers2546
viewsHow to view comments on Rstudio console?
When I write a comment (preceded by the "#" symbol) in a Rstudio script, and press the 'Control+Enter' command, my comment is not displayed on the console screen. Someone would know me how to make…
-
2
votes2
answers3195
viewsError importing data . csv to Rstudio
When I will import and create a file my data to the R it error... I tried the following way: melipona <- paste(system.file(package="dismo"), "/ex/Melipona.csv", sep=";")…
-
2
votes0
answers598
viewsCalculate Weibull distribution parameters from a histogram of wind speeds using Rstudio
I can calculate the shape and scale parameters of the Weibull distribution, where I enter the wind speeds and using the fitdistr() function of the fitdistrplus package I get the shape and scale…
-
2
votes0
answers951
viewsError trying to save script to R
When I try to save my script appears the error message as per image. How to solve this problem?…
-
2
votes2
answers865
viewsDownload CSV file using R
Good afternoon, everyone! how do I download (read) a CSV file from a link like this:…
-
2
votes1
answer198
viewsselect data according to dates
Hello ! How do I select a line data.frame according to some dates ? ex: select the data from coluna 2 for the dates 2016/12/15, 2016/12/25, 2017/01/08, 2018/01/01.…
-
2
votes1
answer885
viewsGroup columns in the R bar graph
I need to generate a bar graph with the following data: structure(c(38792L, 1227L, 23220L, 4177L, 893L, 331L), .Dim = 6L, .Dimnames = structure(list(c("Canvas para Android", "Canvas para iOS",…
-
2
votes2
answers79
viewsJoin for unequal records in R
I have two data frames called employees and employees. nome.empregado <- c('Renato', 'Miguel', 'Paulo', 'Patrícia', 'Inês', 'Saulo', 'Diego', 'Maria', 'Jose', 'Julia', 'Tiago') idade <- c(30,…
-
2
votes1
answer724
viewsBarplot no Rstudio - 2 Columns
I’m trying to plot the data below in R with the barplot but it must be wrong in something, you can help me? dados_estado_civil <- "Estado_Civil Set Out AMIGADO 2494 3857 CASADO 2500 3291 SEPARADO…
-
2
votes1
answer1242
viewsRemoving regulartable decimal places() flextable package {R}
I am making a report in . rmd to export to . docx and to mount the tables I am using the package "flextable" , which works for this type of export. The problem is that when I go to assemble the…
-
2
votes2
answers914
viewsRstudio. Colors in a set of Boxplots
I created this very simple set of boxplots but intended to improve it, namely coloring each of them and eventually improve the code. Someone can help. I leave here the code I created. Thank you.…
-
2
votes1
answer231
viewsAlternative to Miktex
Hello. I am making a document in RMD in Rstudio and would like to export it to word or pdf. I saw that for this I need to install Miktex. However, even following all the steps ( the most brief…
-
2
votes2
answers160
viewsRenaming all Environment objects with a specific name
The Environment is: but I want to convert into: where dataset is the specific name.…
-
2
votes1
answer126
viewsReplace NA with data from another column
I would like to replace NA by the content of another column. I have the following data: NOME TIPO VALOR ABC INTERNACAO 10 ADD 20 AFF CONSULTA 30 DDD EXAME 40 RTF 50 DRGG EXAME 60 How would you…
-
2
votes1
answer56
viewsNotification from one date to another R
DF = data idade dt nome 2 02-02-2016 Marq 8 05-05-2010 Andre 24 06-06-1994 Sudre 23 25-05-1995 Jaq This is my df, I need to get the name of the person when she turns 24. For example, when she’s 90…
-
2
votes2
answers70
viewsHow to return a logical value when the lines have identical values in the R software?
I have a database that contains 3 variables: var1, var2 and var 3. I tried to use some functions in R that would return me a logical value if any of the lines had the same values. One of them was…
-
2
votes3
answers397
viewsHow to categorize values in a Data Frame in R?
In a Data Frame I have a column with the social vulnerability index (IVS), varying from 0 to 1 by county. I need to group some values to stay as the example: #Como Está #Como preciso que fique…
-
2
votes2
answers810
viewsConvert all columns of a data frame
I know that to convert a column I can do df$COLUNA <- as.character(df$COLUNA). But my problem is that I need to convert all 80 columns of 18 arranged dataframes into one list. The idea of…
-
2
votes1
answer194
viewsMy HSD.test does not work. Any tips on how to run?
My treatment is in tracks and I am using as a basis the script taken from the book "Agricultural Experimentation" Kronha & Banzatto pg 161, accessed by website. I intend to perform the Anova and…
-
2
votes2
answers5241
viewsHow to order Ascending and descending in R?
Let’s assume unique(base$workclass)#Checando os valores dos atributos das colunas, instâcias,linhas ou registros unique(base$workclass)# o resultado de apenas unico valor como seria a ordem…
-
2
votes2
answers2044
viewsTranspose a dataframe into R
I have a dataframe in R, columns have dates and values and rows have countries. LOCATION jan 1999 fev 1999 mar 1999 EU28 86.70000 85.50000 85.90000 JPN 99.76086 99.76086 101.47350 USA 90.87153…
-
2
votes1
answer51
viewsWhy R is not finding the created function
Before I had made an extremely large code to be able to extract the results I expected, but the code got quite slow and with that, I’m trying to optimize it: Previous code: Rent division…
-
2
votes1
answer208
viewsHow to Find Higher or Lower Values between Columns within a Data Frame in R
I have a data frame x, and in the column of the name V_de_Busca, where the value is greater than 0, I need to search the column V_Encontrado and locate the first value larger than the one searched…
-
2
votes1
answer114
viewsProblem with Recommendation System in R
I’m trying to develop a recommendation system using the R language. Basically, the system is music recommendation collecting information from a file where there is a certain amount of users and for…
-
2
votes1
answer55
viewsCreate new column in the partial match-based dataframe of the string without repeats
I have a dataframe with two columns, being them GL GLDESC and wanted to add a third column called KIND based on column data GLDESC. Dataframe: GL GLDESC 1 515100 Payroll-ISL 2 515900 Payroll-ICA 3…
-
2
votes0
answers94
viewsLabel reversed Stacked Bar R
The feminine/masculine colors pros generos appear correctly on the chart, however, when I add "Labels" the amount that is gen F appears below and gen M appears in the middle p4 <- ggplot() +…
-
2
votes1
answer45
viewsDefine limitation on generated random numbers
I need to create a random investment portfolio with certain benchmarks. I initialized it with all 0. structure(list(Benchmarks = structure(c(2L, 7L, 6L, 10L, 12L, 11L, 13L, 14L, 15L, 16L, 17L, 1L,…
-
2
votes1
answer81
viewsHow to Store Data in Shiny Tables
I created a very simple Shiny that was simply for a "stock control". It has a table that starts with its products (columns) at zero value. The goal was every time you click the action button 1 it…
-
2
votes1
answer104
viewsLoop with dataframes in ordered logistic regression
I need to estimate an ordered logistic regression in which the database is divided into 417 dataframes giving a total of 33.7 GB. Merging all subsets into a single dataframe would make the option…
-
2
votes2
answers115
viewsRegression Graph in R or Python
It is possible to play this Regression graph in R or Python? Obs. This graph was produced using the Acquire 4 QAQC object. Link And this is the model I’ve created so far. dados =…
-
2
votes0
answers46
views -
2
votes1
answer245
viewsRelative Frequency Table - R / R Studio (% Daily Sales Determined Date/Product)
I have tried in every way to write a code that creates a relative frequency table, but I could not. I have a dataframe with the following variables: RANGE_DIAS: Interval of days between order date…
-
1
votes1
answer367
viewsFit models for meta-regression calculation in R Studio
I started using R Studio a short time ago to do a meta-regression analysis using package Mada. I need to create a model fit for each variable and after creating 6 models fit the R started giving an…
-
1
votes1
answer110
viewsProblem running application in R
While Trying to Run the Script Below: Area="C:\Users\user\Desktop\shape.shp" Pasta="" library(raster) library(rgdal) library(rgeos) library(maptools) long2UTM <- function(long) {(floor((long +…
-
1
votes2
answers5601
viewsHow to calculate the average of a column in Rstudio but ignore the 0 values in the column?
example column 1 = 1 2 3 4 0 0 0 the normal average of this would give 1.428571 but ignoring the 0 would be 2.5, I would like to know how to do this, ignoring the values 0 of the column.