[R] I need help with extracting data :(
Rolf Turner
r.turner at auckland.ac.nz
Sat Sep 12 01:10:31 CEST 2015
This is pretty clearly a homework question and this list does not do
people's homework for them.
You need to learn more about the basics of R syntax. Read "An
Introduction to R", readily available from the R web site.
cheers,
Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
On 11/09/15 22:53, massmatics wrote:
> So this is the question that I need help on. :(
> 4.) ‘Warpbreaks’ is a built-in dataset in R. Load it using the function
> **data(warpbreaks)**. It consists of the number of warp breaks per loom,
> where a loom corresponds to a fixed length of yarn. It has three variables
> namely, breaks, wool, and tension.
> a.) Write a code (Hint: a logical expression) that extracts the observations
> with wool type A and tension level M. Assign it to the object
> **AM.warpbreaks**.
> b.) For the ‘AM.warpbreaks’ dataset, compute for the mean and the standard
> deviation of the breaks variable for those observations with **breaks value
> not exceeding 30**.
>
> My code for 4a) (However, it didn't work. Can somebody help me how to solve
> this problem?) :(
>> warpbreak <- data(warpbreaks("breaks", "wool", "tension"))
>
>> AM.warpbreaks <- c('','type A','level M')
More information about the R-help
mailing list