On 9/27/2005 12:13 PM, Chris Buddenhagen wrote:
> Dear Duncan Murdoch
> 
> Thanks for responding. I will provide more complete info with future
> questions. The data for a small pilot study are below. 
> 
> The values for each month are the percentage cover of an invasive plant here
> in the Galapagos (TT=treatment) type = immediately herbicide applied or
> applied to regrowth later. I called the data glyphosate.txt.
> 
> 
> The code is
> 
> glyp<-read.delim("C:\\Chris\\active projects\\Aristolochia\\glyphosate.txt",
> header=T)
> list(names(glyp))
> 
> This is the output that mystified me:
> 
> [1] "TT"         "type"       "CUADRANTES" "X15dec02"   "X15jan03"  
>  [6] "X15feb03"   "X15apr03"   "X15jun03"   "X15aug03"   "X15oct03"

It looks as though you have column headings like "15dec02".  That's not 
a legal R variable name, so it prepends the X to make it into one.  That 
way you can do things like glyp$X15dec02 to extract that column. 
glyp$15dec02 would give a syntax error.


> 
> While I have an expert on hand I have another question, how do I produce a
> graph of time against percentage cover with error bars. I wanted to only
> present months on the x axis. I start by reorganizing the data using this:

Various functions implement error bars, but I haven't used them in a 
long  time, so I'll leave this question for someone else to answer.

Duncan Murdoch

> 
> glyp2<-reshape(glyp, direction="long", idvar=c("TT", "type",
> "CUADRANTES"),varying=list(names(glyp)[4:10]),v.names="cover") but couldn't
> get month names to appear in the column time.
> 
> 
> 
> TT    type    CUADRANTES      "15dec02"       "15jan03"       "15feb03"
> "15apr03"     "15jun03"       "15aug03"       "15oct03"
> T1    immediate       1       63      59      60      55      4.5     1
> 2
> T1    immediate       2       75      75      75      75      6.5     1
> 2
> T1    immediate       22      72      70      70      65      35      2
> 3.5
> T1    immediate       26      90      80      80      75      17.5    2
> 4
> T1    immediate       33      75      80      85      85      40      1
> 2
> T2    immediate       18      85      80      80      22.5    2.5     2
> 5
> T2    immediate       21      90      85      85      60      16.5    0
> 1
> T2    immediate       23      85      80      80      75      17.5    1
> 2
> T2    immediate       28      90      85      85      27.5    27.5    0
> 1
> T2    immediate       31      90      85      85      9       12.5    1
> 2
> T3    immediate       3       50      58      60      65      35      1
> 2
> T3    immediate       10      63      60      60      15      2.5     0
> 10
> T3    immediate       12      90      85      85      17.5    15      0
> 5
> T3    immediate       16      85      82      80      78      9       1
> 1.5
> T3    immediate       34      75      80      85      85      35      1.5
> 2.5
> T4    wait    4       75      75      75      7.5     2.5     0       0
> T4    wait    11      63      60      60      12.5    2.5     1       2
> T4    wait    24      90      85      80      3.5     5.5     1       2
> T4    wait    29      85      80      80      1.5     4.5     1       2
> T4    wait    32      85      80      80      3.5     4.5     2       3.5
> T5    wait    6       50      50      50      1       1       0.5     2
> T5    wait    14      80      75      75      15      5.5     1       2
> T5    wait    15      90      80      80      1       5.5     1       3
> T5    wait    20      85      80      80      22.5    8.5     0       0
> T5    wait    25      85      80      80      22.5    8.5     1       1.5
> T6    wait    8       75      75      75      1.5     4.5     0       1.5
> T6    wait    9       90      85      85      1.5     3.5     1       2
> T6    wait    13      80      75      75      1       3.5     1       1.5
> T6    wait    19      90      85      80      1       2.5     1       2
> T6    wait    27      85      80      75      1       3.5     1       2
> Tc    control 5       50      45      45      40      23      20      25
> Tc    control 7       50      53      54      55      55      50      55
> Tc    control 17      90      80      70      22.5    9       15      20
> Tc    control 30      75      75      70      75      45      60      70
> Tc    control 35      90      85      80      85      65      60      70
> 
> Chris Buddenhagen, Botany Department, Charles Darwin Research Station, Santa
> Cruz,Galapagos. Mail: Charles Darwin Foundation, Casilla 17-01-3891 Avenida
> 6 de Diciembre N36-109 y Pasaje California Quito, ECUADOR
>  
> 
> 
> 
> 
> 
> ______________________________________________________________________
> EL CONTENIDO DE ESTE MENSAJE ES DE ABSOLUTA RESPONSABILIDAD DEL AUTOR.
> FUNDACION CHARLES DARWIN
> WWW.DARWINFOUNDATION.ORG

______________________________________________
R-help@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

Reply via email to