Questions tagged as 'data.frame'

3
answers

Columns with different line numbers, how to join?

I have some time series (monthly) that end in different months, for example, some end in March 2017, others in April 2017 and some until May 2017, 228 2016-12-01 1.12 229 2017-01-01 1.09 230 2017-02-01 0.87 231 2017-03-01 1....
asked by 04.05.2017 / 20:58
1
answer

Average repeated lines

People, I have a data.frame as follows Gene 12h 10d 6w Slc39a10 1.52 -6.72 -1.84 Slc39a10 1.52 -6.72 -1.84 Mfsd6 -0.15 0.672 0.26 Mfsd6 -2.55 -...
asked by 16.10.2018 / 20:31
2
answers

Collapsing text in a single line in a database

Suppose I have the following data tabela<-structure(list(nome = structure(c(2L, 9L, 6L, 1L, 8L, 3L, 4L, 5L, 7L, 10L, 11L), .Label = c("12 Anos de Escravidão", "A Caça",...
asked by 02.04.2014 / 18:52
1
answer

Select df data according to data from a list

Expensive as shown below: nr <- c(100:199) dt <- rep("data",100) x <- data.frame(nr,dt) y <- c(110:115) I need to get, with the common numbers between the first column of the data.frame x and the list and match <- x[x[1] =...
asked by 24.05.2017 / 20:38
3
answers

How to change order of appearance of columns in a Data Frame?

I have this df mounted on the R: Produto Classificação Comun Quilo Indice 1 ABACAXI HAVAI A GRAUDO 3,32 2,2 2 2 ABACAXI HAVAI B MEDIO 2,81 1,8 3 3 ABACAXI HAVAI...
asked by 09.03.2017 / 19:30
1
answer

Apply a function using some columns of all rows in a Dataframe (r)

I have the following Dataframe: AVG_VOLUME AVG_RETURN VOL PRICE SPX Index 500000 0.01 0.08 2082 KR7000270009 6000 0.02 0.09 102 KR7005930003 7000 0.02 0.08...
asked by 15.04.2016 / 21:34
1
answer

Perform a filter and save in csv

I would like to perform a filter in R. I have a database with 5 variables and more than 5000 rows. One of my variables is "room", in which I have 29 room (ex: room 1, room 2 ...). I would like to perform a filter, to filter all the informatio...
asked by 13.04.2015 / 17:22
2
answers

Reversing order column data.frame

I have this date frame: > head(df1) data spread 1 2006-01-01 -3.0404577 2 2006-02-01 -3.3902628 3 2006-03-01 -2.5283960 4 2006-04-01 -1.5279234 5 2006-05-01 -0.0897918 6 2006-06-01 1.0286549 > tail(df1)...
asked by 14.10.2015 / 22:59
1
answer

How to import data from the clibboard to a data-frame in R

One of the advantages of using spreadsheet is that we can import data from the clipboard. Is there any way to do this in R?     
asked by 14.09.2014 / 17:17
1
answer

Filling in data.frame from another data.frame

I have two data.frames: "a" and "df" a <- data.frame(x=seq(13,37,1),rep(c(1,2,3,4,5),each=5),seq(21,105,21)) colnames(a)<-c("values","date","term") b<-data.frame(x,21,42,63,84,105) colnames(b)<-c("date","term21","term42","term63",...
asked by 27.01.2016 / 19:14