Displaying 20 results from an estimated 7000 matches similar to: "Saving R Graph to a file"
2013 Apr 26
2
Remove reciprocal data from a grouped animal social contact dataset
Hi r-help forum,
I have been collecting contact data (with proximity logger collars)
between a few different species of animal. All animals wear the
collars, and any contact between the animals should be detected and
recorded by both collars. However, this isn't always the case and more
contacts may be recorded on one collar of the two. This is fine, it
depends on battery life and other
2011 Dec 07
5
Object xxx not found
Dear All,
I am having a very basic error, but somehow do not know how to resolve it. I've read a dataset in .csv into R with two columns - sector, export. When trying to plot the data it says "sector not found" This is the formula.
SouthAfrica<-read.csv(c,header=T)
> hist(sector$exports,xlab="exports (MtCO2)",main="CO2 Exports")
Error in
2006 Jul 18
2
Using corStruct in nlme
I am having trouble fitting correlation structures within nlme. I would like to
fit corCAR1, corGaus and corExp correlation structures to my data. I either
get the error "step halving reduced below minimum in pnls step" or
alternatively R crashes.
My dataset is similar to the CO2 example in the nlme package. The one major
difference is that in my case the 'conc' steps are
2008 Aug 21
1
summary.lme and anova question
Dear all,
When analyzing data from a climate change experiment using linear mixed-effects models, I recently
came across a situation where:
- the summary(model) showed a significant difference between the levels of a two-level factor,
- while the anova(model) showed no significance for that factor (see below).
My question now is: Is the anova.lme() approach correct for that model? And why does
2008 Dec 23
2
beginner data.frame question
I need some help understanding how on of the example data sets is
formatted in the basic R installation. If I load the Mona Loa CO2
data, with the command:
> data(co2)
I can view the data with:
> co2
And the data are in the form of 11 rows labeled as years (1994-2004)
and 12 columns labeled (Jan - Dec). This structure appears to be a
dataframe, however, if I type the command
2009 Mar 22
1
Multiple Comparisons for (multicomp - glht) for glm negative binomial (glm.nb)
Hi
I have some experimental data where I have counts of the number of
insects collected to different trap types rotated through 5 different
location (variable -location), 4 different chemical attractants [A, B,
C, D] were applied to the traps (variable - semio) and all were
trialled at two different CO2 release rates [1, 2] (variable CO2) I also
have a selection of continuous variables
2002 Jun 06
2
covariance analysis model
Dear list users,
I have trouble with covariance analysis.
I measured nitrate concentrations in the soil (NO3) and the percentage of
legumes (LEG, continuous), affected by 2 different CO2 concentrations (CO2,
discrete). I suspect that CO2 has an effect on LEG and NO3, but also that
LEG has an effect on NO3, so this is the formula I wrote to test this:
NO3 ~ CO2 + LEG + CO2:LEG
Will LEG be
2004 Jan 22
1
spectrum
Dear R users
I have two questions about estimating the spectral power of a
time series:
1) I came across a funny thing with the following code:
data(co2)
par(mfrow=c(2,1))
co2.sp1<-spectrum(co2,detrend=T,demean=T,span=3)
co2.sp2<-spectrum(co2[1:468],detrend=T,demean=T,span=3)
The first plot displays the frequencies ranging from 0 to 6
whearas the second plot displays the same curve but
2007 Jun 19
1
help w/ nonlinear regression
Dear All,
I'd like to fit a "kind" of logistic model to small data-set using nonlinear least-squares regression. A transcript of R-script are reproduced below. Estimated B and T (the model's coeff, herein B=-8,50 and T=5,46) seem appropriate (at least visually) but are quite diff from those obtained w/ SPSS (Levenberg-Marquardt): B=-19,56 and T=2,37. Am I doing something wrong in
2003 Sep 09
2
Making R packages (Unix)
Hi:
I have have taken over from a colleague who
prepared an R package and failed to build it on
Windows. I am doing this with unix as I am a mac
user. Below is the output I get when I use the
build command:
[gattuso:unix/R/CO2.Rcheck] gattuso% R CMD build CO2
* checking for file 'CO2/DESCRIPTION' ... OK
* preparing 'CO2':
* checking whether 'INDEX' is up-to-date ...
2007 Jun 04
3
test for nested factors
Is there a conventional way to test for nested factors? I.e., if 'a'
and 'b' are lists of same-length factors, does each level specified by
'a' correspond to exactly one level specified by 'b'?
The function below seems to suffice, but I'd be happy to know of a more
succinct solution, if it already exists.
Thanks,
Tim.
---
"%nested.in%" <-
2008 Nov 18
1
Tukey HSD following lme
Hi everyone
I'm using Tukey HSD as post-hoc test following a lme analysis. I'm
measuring hemicelluloses in different species treated with three
different CO2 concentrations (l=low, m=medium, h=high). The whole
experiment is a split-plot design and the Tukey-function from the
package multcomp is suitable for lme-analysis with random factors.
The analysis works fine but I get a non
2006 Oct 23
1
Color eps/ps output from specialized plots?
Hello,
First a disclaimer :) I am very new to using R.
I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen.
Here is an example taken out from "Mixed-Effects Models in S and
2012 Nov 12
2
Using "apply" instead of "for" loop / multithreading
Hello ,
I'm new to R and don't really understand how to use the function "apply"
instead of a "for loop", particularly for a function with multiple entries.
I have a big data file and would like to apply a function in multi thread to
accelerate the processus.
I have a data frame containing values of* CO2 in ppm (resp[i,6])* that I
want to convert in umol of CO2
2013 Jul 09
3
fitting log function: errors using nls and nlxb
Hi-
I am trying to fit a log function to my data, with the ultimate goal of
finding the second derivative of the function. However, I am stalled on
the first step of fitting a curve.
When I use the following code:
FG2.model<-(nls((CO2~log(a*Time)+b), start=setNames(coef(lm(CO2 ~
log(Time), data=FG2)), c("a", "b")),data=FG2))
I get the following error:
Error in
2005 Jul 12
3
using its to import time series data with uneven dates
Good day:
I am trying to use
readcsvIts("nwr_data_qc.txt",informat=its.format("%Y%m%d%h%M
%Y"),header=TRUE,sep="",skip=0,row.names=NULL,as.is=TRUE,dec=".")
to read in a file (nwr_data_qc.txt) that looks like this:
Time Y M D H Min CO2
2000.18790 2000. 3. 9. 18. 30. 373.60
2000.20156 2000. 3. 14. 18. 30. 373.34
2006 Aug 08
1
Split-plot model
How do I set up my model equation in aov to analyze a split-plot design?
I have two factors (CO2 and NITROGEN), each with two levels (high and
ambient). CO2 is my whole-plot factor with three replicates for each level
(i.e., 6 rooms total).
Is this syntax below correct?
summary(aov(response ~ ROOM + CO2*NITROGEN + Error(ROOM/CO2)))
2009 Jul 24
1
how to calculate growth rate of a variable
Dear R Users,
If a variable, say CO2(ppm), is varying with time. Then how to calculate CO2
(ppm) growth rate /a-1
I have CO2 time series (1991-2000), as:
time, year, month, day, hour, min, sec, lat, long, height, CO2
1991.476722 1991 6 24 0 5 0 -38.93 145.15 4270 353.680
1991.476741 1991 6 24 0 15 0 -39.20 145.22 4270 353.950
1991.476747 1991 6 24 0 18 0 -39.43 145.28 4270 353.510
2007 Jul 16
5
formula(CO2)
The formula attribute of the builtin CO2 dataset seems a bit strange:
> formula(CO2)
Plant ~ Type + Treatment + conc + uptake
What is one supposed to do with that? Certainly its not suitable for
input to lm and none of the examples in ?CO2 use the above.
2009 Feb 10
1
harmonic function fiting? how to do
Dear R Users,
I have a CO2 time series. I want to fit this series seasonal cycle and trend
with fourth harmonic function,
and then compute residuals.
I am doing something like:
file<-read.csv("co2data.csv")
names(file)
attach(file)
fit<-lm(co2~1+time+I(time^2)+sin(2*pi*time)+cos(2*pi*time)+sin(4*pi*time)+cos(4*pi*time)+