search for: chemdata

Displaying 6 results from an estimated 6 matches for "chemdata".

2011 Aug 30
3
Descriptive Stats from Data Frame
...o what I need to do in Dalgaard or 'R Cookbook', so I'm asking here. I have a data frame with water chemistry data and I want to start exploring these data. There are three factors (site, date, chemical) associated with each measurement. The data frame looks like this: > summary(chemdata) site_id.sample_date.param.quant BC-0.5|1996-04-19|Arsenic|0.01 : 1 BC-0.5|1996-04-19|Calcium|76.56 : 1 BC-0.5|1996-04-19|Chloride|12 : 1 BC-0.5|1996-04-19|Magnesium|43.23 : 1 BC-0.5|1996-04-19|Sulf...
2011 Aug 31
2
Entering Multiline Commands With ESS
...sing emacs with ESS and want to enter multiline commands for plots. Examples in my reference books show each line terminating with a comma so labels and other attributes can be specified for the plot before it is submitted for rendering. When I try to do this, however, I get an error: > boxplot(chemdata$quant ~ chemdata$param), Error: unexpected ',' in "boxplot(chemdata$quant ~ chemdata$param)," Please explain how I enter these commands. Rich
2011 Dec 28
1
subset() missing one factor
The data set (called 'chemdata') has 6 columns (4 factors, 1 date, 1 numeric) and I need to create subsets for each of one of the factors ('stream'). This has worked flawlessly for all but two streams which were created yesterday. The command I use to create the subsets is like this: > rnchH <- subset(chem...
2011 Oct 04
3
How to subset() from data frame using specific rows
I have a data frame called chemdata with this structure: > str(chemdata) 'data.frame': 14886 obs. of 4 variables: $ site : Factor w/ 148 levels "BC-0.5","BC-1",..: 104 145 126 115 114 128 124 2 3 3 ... $ sampdate: Date, format: "1996-12-27" "1996-08-22" ... $ param : Fac...
2011 Aug 31
1
Correct Syntax for subset.data.frame()
I want to create individual data.frames for each of the 8 param factors in chemdata. The syntax I tried (based on Teetor's book, page 132) and R's response are: > ars <- subset(chemdata, select=c(site,sampdate,param,quant), subset=(param = "As")) Error in subset.data.frame(chemdata, select = c(site, sampdate, param, : 'subset' must evaluate to...
2011 Aug 31
3
Scatter Plot Command Syntax Using Data.Frame Source
I've tried various commands. ?plot, Teetor's book, "R Cookbook", and Mittal's book, "R Graphs Cookbook" without seeing how to write the command to create scatterplots from my data.frame. The structure is: > str(chemdata) 'data.frame': 14886 obs. of 4 variables: $ site : Factor w/ 148 levels "BC-0.5","BC-1",..: 104 145 126 115 114 128 124 2 3 3 ... $ sampdate: Date, format: "1996-12-27" "1996-08-22" ... $ param : Factor w/ 8 levels "As","Ca&...