Questions tagged as 'r'

2
answers

Problems with merge function

I'm having trouble with the merge function of nothingness, it stopped merging the data.frames. It seems like instead of using say cbind , it is using rbind and what is worse triple echo (each = 3). For two data.frames of 4...
asked by 13.02.2018 / 02:29
1
answer

@ slot extraction

Does anyone know what a slot extraction is? I'm trying to follow a script and a part of it is: data <- data.frame names(data) unique <- unique(data@data$binomial) Binomial is the column that I need to use in the case of specie...
asked by 15.03.2018 / 14:49
1
answer

Lines with alternating colors for a categorical variable ggplot

I have a database with feed consumption per animal per day. Here's just a portion of the base to get an idea: Animal Time Consumo 5 1 2.53396 5 2 2.32906 5 3 2.94379 5 4 3.36162 6 1 2.89082 6 2 2.53898 6 3 2.97881 6 4 3.03876 7...
asked by 16.02.2018 / 14:56
1
answer

Data content - R [duplicate]

no R (rstudio) I have a vector v1 <- c(543, 543, 543, 675, 675, 675, 675, 22, 22, 22, 90, 90, 87, 876, 867) . I would like to get a vr vector that represents the count of v1 (increasing 1:n ) of the numbers t...
asked by 02.01.2018 / 17:05
1
answer

Select part of Text in R

I would like to filter specific elements of a row, 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 the name column, lines with the...
asked by 01.12.2017 / 13:15
1
answer

How to enter the column mean in all NA values

Hello. How to enter the mean in all NA values. I have a code that I read the file, check if it has na and does not, but when I transform in number, several NA appear and if I remove, the data gets well reduced from 4000 to about 600: df<...
asked by 17.12.2017 / 17:52
1
answer

Creation of graphical interface in R

I would like to know if there are any packages that allow you to create a graphic user interface with buttons, text box and everything else. And how to generate an .exe from the code in R?     
asked by 30.10.2017 / 11:10
1
answer

Read file exported from Microft SQL 2016

I received an exported Microsoft SQL 2016 file that has a .txt extension and the same file with .csv and looks like this: I searched, but I still have not found anything, does anyone have any experience in importing this file into R?...
asked by 17.10.2017 / 15:09
1
answer

Store 10 values in R

Good morning everyone, I have to do an exercise where I have to store 10 values typed repeatedly and say how many are negative and positive. I need to use the while statement but I do not know how to store these values.     
asked by 27.09.2017 / 21:25
1
answer

I 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()) dados2 <- read.csv(file.choose()) dados3 <...
asked by 27.09.2017 / 20:08