Displaying 2 results from an estimated 2 matches for "painty".
Did you mean:
paint
2011 Jun 09
2
Reshape:cast; error using "..." in formula expression.
...ion, from the reshape
package, I get the following error:
Error in `[.data.frame`(data, , variables, drop = FALSE) :
undefined columns selected
For example:
data(french_fries) #available in the reshape package
> head(french_fries)
time treatment subject rep potato buttery grassy rancid painty
61 1 1 3 1 2.9 0.0 0.0 0.0 5.5
25 1 1 3 2 14.0 0.0 0.0 1.1 0.0
62 1 1 10 1 11.0 6.4 0.0 0.0 0.0
26 1 1 10 2 9.9 5.9 2.9 2.2 0.0
63 1 1 15 1 1....
2009 May 05
1
re shape package - use one cast() instead of many
...f treatment with each type of
"variable" in ff_d. Using the command below gets me this. Subject will get a
column and each treatment type by each variable will also get a column with
values for each.
cast(ff_d, subject~treatment+variable)
subject 1_potato 1_buttery 1_grassy 1_rancid 1_painty 2_potato 2_buttery
.... 3_painty
1 3 18 18 18 18 18 18 18
.... 18
...
Now, if I want to look at just the the values for each variable by subject
I can run the following command.
cast(ff_d, subject~variable)
subject potat...