[R] getting started, reading listing and saving data

Patrick Burns pburns at pburns.seanet.com
Wed Nov 23 11:48:08 CET 2005


The 'corner' function is in the spirit (but not the letter)
of what you ask for.  It is a generalization of 'head' and
'tail' which gives the first or last few items in each dimension
of a matrix or higher dimensional array.

It is available in the public domain code on the Burns
Statistics website.

Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

Ronnie Babigumira wrote:

>Many thanks to Peter Alspach, Jim Porzak and Murray Pung for the help.
>Peter and Jim, head? and tail? was just what I needed to list a few
>observations. Peter, thanks for pointing out str? to me. I totally
>agree with you on its usefulness.
>
>Murray thanks for file > save workspace (and Peters save.image)
>addresses the third of my concerns
>
>One last question related to head and tails, this works best if you
>have a few variables (columns). Given more, how can I use the
>information on the variable names given after str to list the first
>few few observations for a set of variable.
>
>To make it clear. Say I load a dataset with n variables named v1 to
>vn. I use str(mydata) and I get a list of variable names..
>
>str(x)
>v1 ......
>.  ......
>.  ......
>.  ......
>.  ......
>Vn ......
>
>How do i list the first n observations of say v5 to v9
>
>Many thanks
>
>Ronnie
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>
>  
>




More information about the R-help mailing list