For data such as

mydata <- read.table(textConnection("Var1 Response Count
A 1 1
A 2 2
B 6 3
A 7 3"),header=TRUE)
closeAllConnections()

is there a command to transform this data so that there is a single
observation per row?

A 1
A 2
A 2
B 6
B 6
B 6
A 7
A 7
A 7

Thanks,

Juliet

______________________________________________
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 provide commented, minimal, self-contained, reproducible code.

Reply via email to