[datatable-help] Please help me with data frame and melt function in R

Maryia setareh227 at gmail.com
Thu Jan 7 17:03:45 CET 2016


Hi all,

I've just come to the amazing R software, so please be patient if my
question is basic for you. I have 2 text file (say 1.txt and 2.txt), each
file containing 2 columns and thousands row as like below,

case size
case1 120
case2 120 
case3 121
case4 122

(The number of row in two files are different). I would like to combine the
related data frames, so I wrote the following code in R (3.2.3 version),

df1 = data.frame("1.txt",header=T)
df2 = data.frame("2.txt",header=T)
df = data.frame(df1$size,df2$size)
 library(reshape)
melted <- melt(df)

But the melt command gives an error that "Using  as id variables". Actually,
the melt function didn't work here.
Could you please help me out what is wrong here and how to solve it?

Thanks in advance



--
View this message in context: http://r.789695.n4.nabble.com/Please-help-me-with-data-frame-and-melt-function-in-R-tp4716238.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list