Displaying 20 results from an estimated 2000 matches similar to: "NA confusion (length question)"
2010 Apr 16
2
managing data and removing lines
Hi,
I am very new to R and I've been trying to work through the R book to gain a
better idea of the code (which is also completely new to me).
Initially I imputed my data from a text file and that seemed to work ok, but
I'm trying to examine linear relationships between gdist and gair, gdist and
gsub, m6dist and m6air, etc.
This didn't work and I think it might have something to do
2011 Jul 20
2
bar chart issue
Hi everyone,
I determined the presence of three types parasites in a passerine bird
over two years. I would like to create a bar chart that shows the
proportion infected on the y and year/parasite on the x such that each
type of parasite is grouped together (single label) and a bar for each
year . This would show if there have been changes in the prevalence of
a the parasite over two years.
2006 Jul 02
2
how to recode in my dataset?
Dear Rusers,
My question is about "recode variables". First, i'd like to say
something about the idea of recoding:
My dataset have three variables:type,soiltem and airtem,which means
grass type, soil temperature and air temperature. As we all known, the
change of air temperature is greater than soil temperature,so the
values in those two different temperaturemay represent different
2003 Jul 15
7
Excel can do what R can't?????
Hi there
I thought this would be of particular interest to people using 'optim'
functions and perhaps people involved with R development.
I've been beaten down by R trying to get it to perform an optimization on a
mass-balance model. I've written the same program in excel, and using the
'solver' function, it comes up with an answer for my variables (p, ACT,
which
2011 Oct 12
2
Nonlinear regression aborting due to error
Colleagues,
I am fitting an Emax model using nls. The code is:
START <- list(EMAX=INITEMAX, EFFECT=INITEFFECT, C50=INITC50)
CONTROL <- list(maxiter=1000, warnOnly=T)
#FORMULA <- as.formula(YVAR ~ EMAX - EFFECT * XVAR^GAMMA / (XVAR^GAMMA + C50^GAMMA)) ## alternate version of formula
FORMULA <- as.formula(YVAR ~ EMAX - EFFECT / (1 + (C50/XVAR)^GAMMA))
FIT <-
2009 Sep 14
1
ggplot2 graphing multiple lines of data
Some day I may figure out how ggplot2 works.
I am trying to plot 5 columns of data on a graph (similar to a simple matplot)
===========================================================================
library(ggplot2)
bmi <- structure(list(pct = 2:21, P10 = c(14.6, 14.5, 14.2, 13.9, 13.7,
13.7, 13.9, 14.2, 14.5, 14.8, 15.3, 15.9, 16.6, 17.2, 17.8, 18.1,
18.3, 18.4, 18.5, 18.6), P25 =
2012 Nov 14
1
indexing for Wilcoxon test
Hi everyone,
I've been asked to run a number of Wilcoxon tests on some behavioral data
(below is a sample). They want me to compare each trial to the first
trial, considered the control trial. I know I can use brackets to index and
select, for example, trial 1 vs. trial 4 (not exactly sure how to set that
up either) but it would save me a ton of time if there was a way to do all
the
2011 Apr 17
1
side by side histogram after splitting data by year
Hi everyone,
I'm looking to produce a side-by-side histogram of the number of trips
taken by jays with a particular number of acorns after accounting for
year (year "one" and year "two"). I know this involves indexing first
then creating a histogram but I'm not sure how I'd do this. I want to
explore the possibilities that jays are altering their strategies in
2009 May 14
1
automated polynomial regression
Dear all -
We perform some measurements with a machine that needs to be
recalibrated. The best calibration we get with polynomial regression.
The data might look like follows:
> true_y <- c(1:50)*.8
> # the real values
> m_y <- c((1:21)*1.1, 21.1, 22.2, 23.3 ,c(25:50)*.9)/0.3-5.2
> # the measured data
> x <- c(1:50)
> # and the x-axes
>
> # Now I do the following:
2004 Mar 08
2
getting the std errors in the lm function
Hello,
I have a simple question for you:
making:
mylm<-lm(y~x)
summary(mylm)
I get the following results:
******************************************************
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 16.54087 0.19952 82.91 <2e-16 ***
x[1:19] -2.32337 0.04251 -54.66 <2e-16 ***
******************************************************
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me
ayuden mucho en la web.
Estoy haciendo calculos por grupos con data,table. Tengo un archivo
(zp.res) con tres columnas que clasifican los datos (sol, con, dia) y
una columna de datos numericos (media), de la siguiente forma:
sol con dia media
1: con 0 1 -22.6
2: con 0 1 -36.6
3: con 0 1 -35.6
y
2003 Oct 11
1
Subclassing lm
I'd trying to subclass the "lm" class to produce a "mylm" class whose
instances behave like lm objects (are accepted by methods like summary.lm)
but have additional data or slots of my own design.
For starters:
setClass("mylm", "lm")
produces the somewhat cryptic:
Warning message:
Old-style (``S3'') class "mylm" supplied as a
2010 Aug 16
1
need of elegant data manipulation
Dear R users,
I seek for a more elegant manner to manipulate my data that that I
produced so far.
Data is in a data frame THC515.DATA -sample at the end of this mail- of
5 variables, a string and 4 continuous numeric variables.
I need to get the mean of two variables "Q" and "T" at the levels of a
third one "dP", individually for each level of "n".
I
2011 Feb 19
1
problem in plotting numeric x by POSIXt class with lattice
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L), .Label = c("Ashqelon",
"Beer Sheva",
2009 Mar 31
1
using "substitute" inside a legend
Hello list,
I have a linear regression:
mylm = lm(y~x-1)
I've been reading old mail postings as well as the plotmath demo and I came
up with a way to print an equation resulting from a linear regression:
model = substitute(list("y"==slope%*%"x", R^2==rsq),
list(slope=round(mylm$coefficients[[1]],2),rsq=round(summary(mylm)$adj.r.squared,
2)))
I have four models and I
2011 May 20
2
extraction of mean square value from ANOVA
Hello,
I am randomly generating values and then using an ANOVA table to find the
mean square value. I would like to form a loop that extracts the mean square
value from ANOVA in each iteration. Below is an example of what I am doing.
a<-rnorm(10)
b<-factor(c(1,1,2,2,3,3,4,4,5,5))
c<-factor(c(1,2,1,2,1,2,1,2,1,2))
mylm<-lm(a~b+c)
anova(mylm)
Since I would like to use a loop to
2012 Aug 10
5
help error histograma
Hi,
My error isErro em hist.default(dados[[1]], freq = TRUE, seq(0, 30, 0.5), prob = FALSE, : some 'x' not counted; maybe 'breaks' do not span range of 'x'
hist(dados[[1]],seq(0, 30, 0.5), prob=TRUE, xlab="chuva (mm/dia)",ylab="frequĂȘncia", main="", cex.lab=1.6, cex.sub=3,cex.axis=3,cex.main=6)
Someone help me?
[[alternative
2009 Jan 24
2
how to prevent duplications of data within a loop
Hi All,
I had posted a question on a similar topic, but I think it was not
focused. I am posting a modification that I think better accomplishes
this.
I hope this is ok, and I apologize if it is not. :)
I am looping through variables and running several regressions. I have
reason to believe that the data is being duplicated because I have
been
monitoring the memory use on unix.
How can I avoid
2007 Apr 06
2
lm() intercept at the end, rather than at the beginning
Hi,
I wonder if someone has already figured out a way of making
summary(mylm) # where mylm is an object of the class lm()
to print the "(Intercept)" at the last line, rather than the first
line of the output. I don't know about, say, biostatistics, but in
economics the intercept is usually the least interesting of the
parameters of a regression model. That's why, say, Stata
2005 Oct 31
4
Import help (neophyte)
Hi, I have no experience with R and I'm finding the manuals a bit obtuse
and written as if I already understood R.
I'm trying to import a csv file from a floppy and it's not working. The
code I'm using is
read.table("F:\GEORGIA\species_richness\SR_use.csv", sep=",", header =
TRUE, row.names = 1)
I'm assuming that this command is case sensitive so