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
-
1
votes0
answers91
viewsHow to transform a rgb color space into Hsv in R
How do I read an image from a folder, and turn it from rgb to Hsv by extracting an array of pixels for the parameters h, s and v (all by R software)??
-
1
votes1
answer1848
viewsSelect part of Text in R
I would like to filter specific elements of a line, similar to the Excel filter. I have the following example: NOME VALOR LEITO 1 10 LEITO 2 - HPP 20 LEITO 3 - HPP 30 LEITO 4 40 I need to filter, in…
-
1
votes1
answer1499
viewsI need to add captions to my chart in R
#--------------Biblioteca necessária para gerar gráficos library(ggplot2) #setwd( '/home/gabriel/Videos' ) #-------------------------------Carrega arquivo csv dados1 <- read.csv(file.choose())…
-
1
votes1
answer923
viewsData containment <- R
in the R (rstudio) I have a vector v1 <- c(543, 543, 543, 675, 675, 675, 675, 22, 22, 22, 90, 90, 87, 876, 867). I’d like to get a vector vr which represented the count of v1 (increasingly 1:n)…
-
1
votes0
answers99
viewsDifferences between brglm and logistf packages
I am working with a dashboard database that contains information about publicly traded companies from BOVESPA. Below follows a piece of this database: My dependent variable is binary (ROIC.MEDIANA)…
-
1
votes2
answers1516
viewsHow to create column from data contained in other columns
Hello, I’m new in R and I’m getting beaten to solve this problem. I have a spreadsheet that I called base and has 2573 observations of 103 variables. I created an auxiliary column named after…
-
1
votes1
answer446
views -
1
votes1
answer221
viewsValues in the chart axes in Rstudio
Hi, I’m new to R. I plotted the data I wanted, but no value came up. How to solve it? It’s little data. The data are as follows, filling only the fourth column (Avg.1). From now on I thank anyone…
-
1
votes0
answers178
viewsProblem in shinyapp publication
The app(ui+server) runs normally but when publishing to http://www.shinyapps.io/ is giving the image error how to proceed to resolve. If necessary I can post the codes.…
-
1
votes1
answer952
viewsHow to insert, as a new column, the names in a vector in R?
I have a vector, called istrain, with names: istrain = c("carri", "challeng", ...) And I intend to turn them into columns of a dataframe, testSparse, which contains frequency of occurrence of words…
-
1
votes1
answer112
viewscreate data.frame where the file output is placed in columns
Hello! I have a little problem in R.... I have a file called dados_dia with different weather variables: Índice de claridade (I.Cla),Wind speed (speed), Umidade relativa (hH)and Temperatura do ar…
-
1
votes2
answers634
viewsBoxplots - rstudio
I intended to color the various boxplots underlying the code I made (I leave here) but I’m having some difficulty. If it is possible for someone to give some info on how to do it, thank you. Thank…
-
1
votes0
answers1260
viewsNormalisation of data in R
I’m trying to normalize the data and give the following error: Error in if (colSd != 0) res[, i] <- (x[, i] - colMean)/colSd else res[, : missing value where TRUE/FALSE needed the code in R is…
-
1
votes2
answers1914
viewsArgument is neither numerical nor logical: returning NA
Searching for answers about the mistake I came across while trying to analyze data in the R, I found a very similar case, but not identical to the one I came across. So I decided to write my…
-
1
votes1
answer2529
viewsError installing packages in Rstudio
Every time I try to install some package in Rstudio this error message appears Error in install.Packages : cannot open file…
-
1
votes1
answer68
viewsHow can I assign a variable to a table?
This table is only in one column ! I need to assign the age(age) variable, to make the average, variance, ..., but I can’t do it because they are in the same column.…
-
1
votes0
answers27
viewsConvert pdf to TIFF
I need to convert a pdf to an image .TIFF. I’m using the code below: library(pdftools) library(tiff) convertidoTIFF <- pdf_convert(pdfTeste, format = "tiff") length(convertidoTIFF) armaz <-…
-
1
votes1
answer133
viewserror when importing . ODS in R
I’m trying to import a table. ods in R library(readODS) setwd("~/Documents/Mestrado/dissertacao") dados <- read_ods("teste.ods", col_names = T) however when loading the worksheet it does not…
-
1
votes0
answers46
viewsIt’s coming up on Rstudio. Is this a bug?
When do I perform Ctrl+Alt+B to execute the command in the script, occasionally it is inserted in my script ☺, ♥, ♦ and ♣. This is some bad rstudio configuration or a bug in this IDE?…
rstudioasked 5 years, 10 months ago Márcio Mocellin 1,443 -
1
votes1
answer199
viewsR update on Mac
How do I update R and Rstudio, but without losing the packages I already own? Mac usage
-
1
votes2
answers2399
viewsHow to replace semicolon by dot in a dataframe in R Studio
I am importing a CSV file where the data comes separated by commas, but I need to export them in the R pattern, which is the ".". I have tried using the function as.Numeric, but the values disappear…
-
1
votes1
answer854
viewsHow to clean R’s Global Environment?
What is the command to clear the Global Environment from R?
-
1
votes1
answer53
viewsConsult Multiple Columns in R
I have a DF and would like to consult multiple columns at the same time in an Auxiliary Table. Example of DF: MATRICULA <- c(123,456,789,111,222,333) DIA_1 <-…
-
1
votes1
answer90
viewshow to create a frequency histogram with preset non-uniform intervals?
How can I make a histogram on Rstudio with the frequency on the y-axis and on the x-axis non-uniform predefined intervals, for example: 0-50, 50-150, 150-500, 500-2000. I have a hypothetical…
-
1
votes2
answers509
viewsHow to create a sequence of dummy variables with loop in r
I would like to create Dummies to identify the company in the database. For example, a new variable called "GLO" would be 1 if the enterprise variable assumed the value GLO and 0 c.c. The data…
-
1
votes1
answer30
viewsHow to edit values in a column?
Hello, I have a dataset with the following columns date total_cases 2019-12-31 0 2020-01-01 0 2020-01-02 0 2020-01-03 0 2020-01-04 0 2020-01-05 0 I am trying to take days and leave only the year and…
-
1
votes1
answer31
viewsBase Reading Step Bar
I am developing an app in Shiny that the user climbs a spreadsheet and is calculated some statistics from that base. I would like the moment the database is being read, not displayed in the upload,…
-
1
votes1
answer55
viewsOverwrite all data from a column of a data frame in R
Assuming I have the following data frame (just one example, as mine has almost 200,000 lines): ae <- c(1,2,3,4,5,6,7,8,9,10) be <- c(10,9,8,7,6,5,4,3,2,1) pnadc1 <- data.frame(ae,be) I need…
-
1
votes1
answer36
viewsRandom Number Generator with Restrictions
I need to define randomly the weight of an investment portfolio that is divided into three types and cm the following limitations: Fixed income [0-100%] Variable Income [0-30%] Investment abroad…
-
1
votes1
answer43
viewsAdd equal lines from different tables in R
I am having several tables with three columns as output, for example: Inicial Final Mudanca 1 1 200 1 3 500 3 1 250 3 3 175 Tabela 2 Inicial Final Mudanca 1 3 180 1 5 265 3 3 147 3 7 155 I need to…
-
1
votes1
answer23
viewsR language - Column separation
I have the two columns below and I need to separate them so that the digits are in other columns. The idea is to have at the end 4 columns with names of teams and score. Two columns of df2 type…
-
1
votes0
answers272
viewsError accessing Rstudio 127.0.0.1
I’m trying to access Rstudio and this error appears: 127.0.0.1 refused to connect. Try: Check the connection Check proxy and firewall ERR_CONNECTION_REFUSED if I go in cmd and der ping: C: Windows…
-
1
votes1
answer184
viewsHow to downgrade gcc, g++ and gfortran compilers?
I’m trying to install the package mice in Rstudio, but the installation fails and shows the error/usr/bin/ld: -lgfortran not found. I noticed that there is no directory called /usr/bin/ld on my PC,…
-
1
votes1
answer71
viewsSeasonality chart with ggplot2
I have an example graph that shows the seasonality of a given per month over the years. I would like to adapt the chart to days of the week, I have the example code, but I’m not able to adapt it.…
-
1
votes0
answers237
viewsUsing the "as Numeric" function in Rstudio
Hello! I am trying to create a new binary variable to an existing database using the following code: leaders$warbefore <- as.numeric(leaders$interwarbefore == '1', leaders$civilwarbefore == '1')…
-
1
votes0
answers91
viewsRstudio - Update and add new data
Hello, I’m looking for IBGE data (library("sidrar")), df <- get_sidra (api = "/t/1846/n1/all/v/all/p/all/c11255/90707/d/v585%200") #Selecionando as colunas que me interessa df1 <-…
-
1
votes1
answer64
viewsRegex for numbers of different sizes
I need to read an image . png with a financial handling table, like the one below: From this table I need to extract the columns gross balance, availabilities, Application/Redemption and Final Gross…
-
1
votes0
answers63
viewsInformation download (Fault - Network error)
Hello, I’m having difficulty downloading data from Anatel’s website through R Goal: Download data from Anatel’s website url = 'https://www.anatel.gov.br/dadosabertos/paineis_de_dados/acessos/' for…
-
1
votes2
answers78
viewsTables type GT not printing inside loop in Rmarkdown
I’m programming a report generator that exports html. I use two files, the first is a loop that will determine the number of reports and within my template. Rmd I have another loop to print several…
-
0
votes1
answer608
views -
0
votes1
answer806
viewshow to calculate the average of only one part of a Rstudio column
I have separated only a part of a column, I cannot work with this data, I can only visualize it separately. Someone can help me?!…
-
0
votes0
answers34
viewsError to generate a Seasplot chart
generating this code: inflacao <- ts(read.csv2('inflacao.csv',header = T,sep = ';',dec = ','), start = c(1980,01),freq=12)[,-1] then the Seasplot: seasplot(inflacao, outplot = 4) Makes this…
-
0
votes2
answers1913
viewsR - Search lines in a data frame conditioned on the part of a string
I have a data frame with several lines, in these lines I have a sentence that contains by default the word "Ad", I want to generate a new data frame that contains only the lines that in the sentence…
-
0
votes0
answers68
viewsAggregate function in R
Good afternoon. I am using the function aggregate to group some data. However, I am only using one variable to add up. I would like to use more than one variable. Is this possible? I am using the…
-
0
votes1
answer161
viewsBoxplot of ggplot2 giving error (does not make the boxes, only a few points with some scratches), how to fix? OBS: I made other graphics and it worked, only the one stuck
boxef <- ggplot (effectsize, aes(subordemfam, varbiom.efs, colour = classe2)) boxef + geom_point() + geom_boxplot() + xlab("Táxon") + ylab("Effect Size na Variação de Biomassa") + theme_bw() +…
-
0
votes0
answers37
viewsRstudio - Boxplot
I have a graphic with a set of 3 Boxplot that all appear, depending on the code I made, in "gray" and I can’t change that color. I leave here the code I have in the script. I would ask for help to…
rstudioasked 6 years, 7 months ago F. Marques 29 -
0
votes1
answer50
viewsHow to plot/map spatial random effects (Spatial Random Effects) in R?
I am working with visceral leishmaniasis data in census tracts of a Brazilian municipality. I ran a Baysian space model (CAR conditional autoregressible model) BYM from the Carbayes package in the R…
-
0
votes1
answer82
viewsCassandra + Spark + R connection
How do I connect Cassandra to Spark? Cassandra > Spark > R I’ve already been able to connect R to Spark, now I need to bring the data that is stored in Cassandra to Spark and finally analyze…
-
0
votes1
answer756
viewsformat X-axis of bars in ggplot2
I generated a bar graph in ggplot2 , but the X axis data was not in the number sequence of "1 - 30", I would like to know how to get the sequence right? here are the Scripts c<- c ("Casal 1",…
-
0
votes0
answers61
viewsPackage: sp error starting Rstudio
When starting Rstudio the following message appears: Loading required package: sp. I try to install the package sp and the message appears: Warning in install.packages : package ‘sp’ is in use and…