Displaying 20 results from an estimated 4000 matches similar to: "IF/Else"
2005 Nov 21
3
Warning message help
I am trying to great a new column of effort data from an existing vector
of gears used.
It is a simple code where
effort[Gear==300]=(DIST_TOW*7412)
effort[Gear==301]=(DIST_TOW*7412)
The code appears to work for some of the data but fails for others and
inserts a NA value
I also get this warning message
Warning message:
number of items to replace is not a multiple of replacement length
Can
2006 Jan 29
1
line numbers
I am using the sink function to save several results (i.e. values of many different variables) to an output file. However, the output looks unattractive because it displays line numbers next to each new variable, it is difficult to remove the R variable name from the output, and I cannot print test without it using quotation marks. The only way I have found around most of these issues is to
2006 May 03
4
Aggregate?
Hello,
I have a data set with a grouping variable (TRIPID) and several other
variables. TRIPID is repeated in some areas and I would like to use a
function like aggregate to sum the variable UNITS according to TRIPID.
However I would also like to retain the other variables as they are in
the data set with the new summed TRIPID.
So what I have is something like this:
YEAR MONTH DAY
2006 May 03
4
Aggregate?
Hello,
I have a data set with a grouping variable (TRIPID) and several other
variables. TRIPID is repeated in some areas and I would like to use a
function like aggregate to sum the variable UNITS according to TRIPID.
However I would also like to retain the other variables as they are in
the data set with the new summed TRIPID.
So what I have is something like this:
YEAR MONTH DAY
2006 May 10
3
Unique?
Hello,
I have sample data set that looks like:
YEAR MONTH DAY CONTINUE SPL TIMEFISH
TIMEUNIT AREA COUNTY DEPTH DEPUNIT GEAR TRIPID
CONVUNIT
1992 1 26 1 SP0073928 8
H 7 25 4 NA 1000000
02163399054 161
1992 1 26 1 SP0073928 8
H 7 25 4 NA 1000000
02163399054 8
1992 1 26 2 SP0004228 8
H 7 25 4 NA 1000000
02163399054 161
1992 1 26 2 SP0004228 8
H 7 25 4 NA 1000000
02163399054 8
1992
2011 Feb 06
1
anova() interpretation and error message
Hi there,
I have a data frame as listed below:
> Ca.P.Biomass.A
P Biomass
1 334.5567 0.2870000
2 737.5400 0.5713333
3 894.5300 0.6393333
4 782.3800 0.5836667
5 857.5900 0.6003333
6 829.2700 0.5883333
I have fit the data using logistic, Michaelis?Menten, and linear model,
they all give significance.
> fm1 <- nls(Biomass~SSlogis(P, phi1, phi2, phi3), data=Ca.P.Biomass.A)
2013 Nov 07
1
problem with interaction in lmer even after creating an "interaction variable"
Dear all,
I have a problem with interactions in lmer. I have 2 factors (garden and
gebiet) which interact, plus one other variable (home), dataframe arr. When
I put:
/
lmer (biomass ~ home + garden:gebiet + ( 1|Block), data = arr)/
it writes:
/Error in lme4::lFormula(formula = biomass ~ home + garden:gebiet + (1 | :
rank of X = 28 < ncol(X) = 30/
In the lmer help I found out that if not
2012 Feb 03
1
ordering of factor levels in regression changes result
I was surprised to find that just changing the base level of a factor variable changed the number of significant coefficients in the solution.
I was surprised at this and want to know how I should choose the order of the factors, if the order affects the result.
Here is the small example. It is taken from 'The R Book', Crawley p. 365.
The data is at
2011 Apr 13
1
print to .jpeg
Evening folks,
I'm trying to print a series of graphs to .jpeg using a variable as the
title, but run into the difficultly that I can't find a way to append the
file extension to the .jpeg (in this case extensionless!) files.
Example:
----
species.name="CussoniaHolstii"
dia<-10:100
biomass = -21.4863 + 0.5797 * (dia ^ 2)
biomass
jpeg(species.name)
plot (biomass,
2009 Jul 20
2
HELP: BRUGS/WinBUGS/RBUGS Response is a combination of random variables
Hi,
Is there anyone know if BUGS language allows the combination of variables as response
such as
Y[i] <- a*X1[i]+b*X2[i]
Y[i] ~ dnorm(c,d)
It seems doesn't work in my model. The problem is between two ######.
The error message is
> modelCheck("BayesBioMarker.BUGS")
model is syntactically correct
> modelData(paste("BUGS_data.txt",sep=""))
data
2012 Sep 14
1
linear mixed-effects models with two random variables?
Dear R users,
Does anyone knows how to run a glmm with one fixed factor and 2 random
numeric variables (indices)? Is there any way to force in the model a
separate interaction of those random variables with the fixed one?
I hope you can help me.
#eg.
Reserve <- rep(c("In","Out"), 100)
fReserve <- factor(Reserve)
DivBoulders <- rep
2008 Feb 21
1
update don't find an object
Hi,
I have a situation here.
I try this update:
mmaa <- update(mma,biomass~qvartemp)
but I have this message:
Error in eval(expr, envir, enclos) : object "qvartemp" not found
but this object exist:
[1] "cont" "i" "levelsord" "mma" "qvar" "qvarmma"
[7] "qvartemp" "test"
2017 Jun 21
0
Help/ Mathematics
Hi Ahmed,
Your problem appears trivial as you have already specified the form of
the calculation.
Learn how to "extract" specified elements from a data structure:
# first value
sum(dataset1$NPP[dataset1$date >= date1 &
dataset1$date <= date2])
# second value
dataset2$biomass[dataset2$date == date2] -
dataset2$biomass[dataset2$date == date1]
# third value
2011 Apr 20
3
succession time series graph
Dear gracious R community,
I would like to produce charts of phytoplankton biomass changes
through time. Each species has a line, and the biomass varies in
mirror form along the line for each species along the X time axis.
Here is an example of what I'd like to do:
http://www.er.uqam.ca/nobel/r30240/Succession.jpg
Any suggestions?
Thanks
David Bird
UQAM, Montreal
2009 Jul 23
1
simple lme question
Hi everyone,
I am trying to analyse my data from a small plant experiment (for a meeting tomorrow afternoon) and am a beginner to R so I apologise if this is a very basic question.
I carried out a plant experiment examining plant interactions between two species (A and B) under different watering treatments. I had:
- 7 watering treatments (7 different watering frequencies labelled 1-7)
- 3
2017 Jul 10
3
Samba ADS-member-server: FQDNs in /etc/hosts
(new thread, same migration project)
I see GPOs applied, but network drives sometimes mapped, sometimes not.
Found something around hardened UNC paths, applied some GPO, dunno if
that is necessary or helps (I still have to check where to apply that
GPO, computer or user ...).
While debugging that I find in log.smbd on the member server:
[2017/07/10 11:22:20.290018, 1]
2004 Jan 05
3
Heeeeeelp! Estimatet Marginal Means of ANOVA needed!
Hello!
I urgently need to know if it is possible (and if so, how to do) to get
the "Estimatet marginal means" from an ANOVA.
Or explained more coplicated: It's about plants sewn in 2 densities & 2
patterns. The Variable is biomass and I also use a Covariate. There are highly
significant differences between density & pattern but I don't know which of the
2 densities
2017 Jun 21
4
Help/ Mathematics
Hi R users,
I need your help to write a code in r that does the following
calculation from three different datasets;
ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2
-biomass at date 1, dataset = 2) + (littfall at date 2, dataset=3).
all the dates are in yr-month-day format. Which library or function
Should I use to tell R do these calculations of these variables at
2013 Mar 26
2
Problem with nested for-loop
Hello,
I'm working on a problem using nested for-loops and I don't know if it's a
problem with the order of the loops or something within the loop so any
help with the problem would be appreciated. To briefly set up the problem.
I have 259 trees (from 11 different species, of unequal count for each
species) of which I am trying to predict biomass. For each tree species I
have 10000
2011 Aug 24
1
R (&stats) newcomer.... help!
Hi all,
I hope that i've posted this in the correct place. if not, please accept my
apologies (where should this go?)
I have carried out experimental removal of bivalves at 2 intertidal shores.
Bivalves were removed by raking of surface sediments. I wish compare the
biomass values of for a total of 8 species between the 2 shores
My 3 treatments are: Undisturbed Controls (Cont), Procedural