Displaying 1 result from an estimated 1 matches for "plan_a".
2010 Jun 26
1
All a column to a data frame with a specific condition
Hi, folks,
Please first look at the codes:
plan_a=c('apple','orange','apple','apple','pear','bread')
plan_b=c('bread','bread','orange','bread','bread','yogurt')
value=1:6
data=data.frame(plan_a,plan_b,value)
library(plyr)
library(reshape)
mm=melt(data,...