I guess I'll have to be really careful about my line breaks. Thank you all
for your help!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and p
I'm wondering whether there is a character to let R know to expect more
input for a command on subsequent lines. Here is an example:
test_1.R:
x <- c(1,2,3,4)
/ c(1,2,3,4)
x
R CMD BATCh test_1.R produces test_1.Rout:
> x <- c(1,2,3,4)
> / c(1,2,3,4)
Error: unexpected '/' in " /"
Execution
Thank you all so much for your help.
I've gone with
repeated_measures_data.csv:
sub,A1B1,A1B2,A2B1,A2B2
s1,400,475,420,510
s2,390,500,470,472
s3,428,512,555,610
s4,703,787,801,822
s5,611,634,721,705
s6,543,522,612,788
s7,411,488,506,623
s8,654,644,711,795
library(reshape)
data<-read.csv("repeate
I have a data frame in wide format that I'd like to convert to long format.
For example, in wide format I have:
id A1B1A1B2A2B1A2B2
1 1 400 475 420 510
2 2 390 500 470 472
3 3 428 512 555 610
4 4
I would like to make a new vector with values taken from two existing
vectors conditional upon a third. At present I am doing this with a for loop
but wonder if there is not a neater way, given some of the very neat things
R can do.
a<-rep(c("A","B"),50)
b<-rep(1,100)
c<-rep(2,100)
a is thus "A"
5 matches
Mail list logo