attach(x)
Following file has been used for ANOVA analysis:
(Download the data file)
Let first read in the data from the file:
>x <- read.csv("anova.csv",header=T,sep=",")
There are 3 variables, "Expression", "Gender" and "Subtype". We can display the variables by:
>x$Gender
[1] m m m m m f m m f m m f m m m m f m m m m m m f m m m f m m m m f m m m m [38] m m m m m m m m m f m f m m m m m f m m f m m f m m m m f m m m m m m m m [75] m m f m m m m m f m m m m m m m m m f m m f m m f m f m m f m m f m m f m [112] m f m m f m m m f m m m f m f m f f f f f f m f m f f f m f f f f m f m f [149] m f f m f f f f f m f m f f m f f m f f m f f f m f f f m f f f m f f m f [186] f f m f f m f m m f m f m f f m f f f f f m f f m f f f m m m f m m m f f [223] f f f f f m m m f m f f m f f f m f f f m f f f f m f m f f f f m f f f m [260] f f m f f f f f f m f f m f f f f f f m f f Levels: f m
We can't use the variable "Gender" in R Search Path:
>gender
Error: object 'Gender' not found
After attach the object "x", "Gender" can be used globally:
>attach(x) >Gender
[1] m m m m m f m m f m m f m m m m f m m m m m m f m m m f m m m m f m m m m [38] m m m m m m m m m f m f m m m m m f m m f m m f m m m m f m m m m m m m m [75] m m f m m m m m f m m m m m m m m m f m m f m m f m f m m f m m f m m f m [112] m f m m f m m m f m m m f m f m f f f f f f m f m f f f m f f f f m f m f [149] m f f m f f f f f m f m f f m f f m f f m f f f m f f f m f f f m f f m f [186] f f m f f m f m m f m f m f f m f f f f f m f f m f f f m m m f m m m f f [223] f f f f f m m m f m f f m f f f m f f f m f f f f m f m f f f f m f f f m [260] f f m f f f f f f m f f m f f f f f f m f f Levels: f m
>detach(x) >Gender
Error: object 'Gender' not found