[R] stars graphs

Tito de Morais Luis Luis.Tito-de-Morais at ird.sn
Wed Aug 13 17:03:11 CEST 2003


Hi listers,

A few days ago I posted a question about the use of the stars function
on selected lines of a frame. Thanks to two helpers, a closer look at
the scale argument allowed to partially solve the problem. Yet I still
have a problem with stars.

Allow me to explain what I intend to do (sorry for my poor English and
the long post):

I want to graph an activity index of a fish during the day cycle with a
star or radar type graph. I know that the R stars function was not
written for that purpose. But I couldn't find another way to try to do
it. I would appreciate if you could point me to a more appropriate
function.

I looked at the archives and only found the link below, which pointed me
to the stars function:
http://maths.newcastle.edu.au/~rking/R/help/01c/2464.html

My data frame (2 cols, 55 rows) has the activity index (range 0:1) in
the first column. In the second column is the cumulated time (in minutes
- range 0:1440) between successive measures of activity.

I would like the radius length be the activity index and the angle
between two successive plots proportional to elapsed time. In addition
time or a character label, is to be written on the graph. 

I tried with no success to graph it using both the data frame and its
"transposed" (2 rows, 55 cols).

As in the actual file there are 55 measures of activity at different
hours of the day (not regularly spaced). You can simulate data with
something like :

df <- data.frame(activ=runif(55),cumtime=round(seq(1,1440,l=55)))
df$cumtime[1]=0

df looks like my actual data except that the actual data are not
regularly spaced in time. But this is not important for the graph.

Maybe stars() is totally inadequate for the purpose. If no other
solution is available in R, I will try to write down my own and post it.
But it may take me a while as I am a newbie in R. Any hint will be
appreciated.

Regards,

Tito



-- 
L. Tito de Morais
      UR RAP
   IRD de Dakar
      BP 1386
       Dakar
      Sénégal

Tél.: + 221 849 33 31
Fax: +221 832 16 75
Courriel: tito at ird.sn




More information about the R-help mailing list