[R] Singling out observations

2012-02-13 Thread Kurt_Helf
Greetings I am attempting to plot observations of a cave aquatic invertebrate dating from 1901-2004. I can come up with a nice lattice plot of the eight sites from which I have data easily enough. However, I'd like to be able to highlight the 0 observations on the plots, i.e., attempts to fi

[R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Kurt_Helf
Greetings Though I have months in chronological order in my data table, the data were sampled every other month (i.e., February, April, June, August, October, December), every time I try to plot them (on the x-axis) they are plotted in alphabetical order. What am I missing? Cheers Kurt

[R] substituting level for NA in factor column

2011-01-18 Thread Kurt_Helf
Greetings I have a bunch of NAs in a column of categorical variables designating the size classes (e.g., smallest to largest: 1,2,3,4) of cave crickets. I'd like to substitute "U" (for unknown) for the NAs. Can anyone give me an idea how to do this? Thanks in advance. Cheers Kurt **

[R] OT: Reducing pdf file size

2011-01-05 Thread Kurt_Helf
Greetings Does anyone have any suggestions for reducing pdf file size, particularly pdfs containing photos, without sacrificing quality? Thanks for any tips in advance. Cheers Kurt *** Kurt Lewis Helf, Ph.D. Ecologist EEO Counselor

[R] Date variable error

2010-12-13 Thread Kurt_Helf
Greetings In attempting to create a date variable based on month (e.g., February, April, etc.) and year (e.g., 2006) data, wherein I converted Month to a factor with Jan=1...Dec=12, I used the following command: data$Date<-mdy.date(month=data$Month,day=15,year=data$Year) however, I get a mes

[R] Inserting Missing Data

2010-11-10 Thread Kurt_Helf
Greetings I'm attempting to insert missing data on the smallest size class of cave cricket instars into a data frame. The data involve censusing photoplots (plots) of roosting cave crickets in which we discern in four instars or size classes. I need to insert data on size class one into a da

[R] Confusing error statement

2010-10-22 Thread Kurt_Helf
Greetings Using the following command I've been trying to subset a dataframe of counts of an organism to compute the sizes of groups for use as a predictor: Hs.patches <- as.data.frame(with(Hs.long, table(Cave,Year,Month,Region,Plot,))) I am getting the following error message that I d

[R] remove numbers from string of characters

2010-10-18 Thread Kurt_Helf
Greetings I want to remove numbers from a string of characters that identify sites so that I can merge two data frames. For example, a site in one frame is called "001a Frozen Niagara Entrance" whereas the same site in the other data frame is called "Frozen Niagara Entrance". It seems to m

[R] strip month and year from MM/DD/YYYY format

2010-10-13 Thread Kurt_Helf
Greetings I'm having difficulty witht the strptime function. I can't seem to figure a way to strip month (name) and year and create separate columns from a column with MM/DD/ formatted dates. Can anyone help? Cheers Kurt *** Kur

[R] Merging two data sets

2010-09-23 Thread Kurt_Helf
Greetings I need to merge two data sets. The first data set contains information on individual organisms roosting in clusters,e.g., cluster one has 5 individuals: 3 females, two males, and one juvenile and so on for hundreds of clusters. The second data set contains temperature data on each o

Re: [R] R-help Digest, Vol 91, Issue 21

2010-09-21 Thread Kurt_Helf
All Is there a script in R equivalent to the "if then" transforms one can perform in Systat? For example, I want to create a "Treatment" column coded either 1 or 2 for twelve field sites in a large data set. Ideally, I'd be able to tell R to code sites a-f as 1 and sites g-l as 2. Cheers Kur

[R] generating ordered, random decimal fractions

2010-06-12 Thread Kurt_Helf
Greetings How do I do this in R? Checking the Cran site produces a bewildering array of packages that I can't seem to find to load. Surely the main program has this function? Cheers Kurt *** Kurt Lewis Helf, Ph.D. Invertebrate Ecologist