[R] Array help
David Winsemius
dwinsemius at comcast.net
Mon Nov 29 05:23:57 CET 2010
On Nov 28, 2010, at 10:56 PM, bfhancock wrote:
>
> Josh, the data set is called StatTemps and is in the PASWR package.
> I want
> to make an array that involves only the 8 a.m. and a separate array
> that
> involves only the 9 a.m. so i can get info on the temperatures in
> those
> groups. So I still want it in the format of StatTemps but in two
> arrays that
> are based on 8 a.m. or 9 a.m. I have been messing with this for a
> while.
> And no it's not homework, I am just trying to learn R so I am more
> appealing
> out in the field eventually. They book I am using is confusing!
> Hopefully
> what I am trying to do isn't confusing. I want to do an array that
> holds
> the info from 1:6 & 12:22 for 8am and then 7:11 & 23:34 for 9am. I
> was able
> easily make two arrays based on sex by just putting in
> StatTemps[1:11,,] &
> StatTemps[12:34,,] and assumed I could just go
> StatTemps[1:6&12:22,,] and
> StatTemps[7:11&23:34,,] but that didn't work. Any ideas? Thanks so
> much!
>
It may not be an array (since time values don't play very well with
that data structure.) If there is time as an index, it may be a more
complex object such as a time-series or zoo. Check with str().
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list