Displaying 20 results from an estimated 20000 matches similar to: "Create NA"
2010 Mar 23
3
Summing with NA
Hi all,
May I request for your help if you have time and if you have an idea on how
to do this. I want to add three vectors... And my goal is to obtain the sum
of the vectors, ignoring the vector of "na"...
Here is what i did in R.. I'm adding the three vectors, e,z,k, and my
objective is to get an answer = -23.
I tried putting the na.omit but it did not work. Thanks.
> z
[1]
2008 Jun 25
2
I want to install a package on Max OS X from a local file
I can't figure this one out- I am the administrator, The file that I want
to install is a .tar.gz which is located on my desktop. How do I get it
into my packages directory- through the GUI or through brute force?
thanks
stephen
--
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel
2008 Oct 20
2
calculating mean for samples
Hi everyone,
> does any one knows how can I calculate mean for different samples
> i.e. I have a data like this:
>
> s1 s2 s3 s4
> 1 0 0 0 1
> 2 1 0 1 0
> 3 0 0 0 0
> 4 0 0 0 0
> 5 0 1 0 1
> 6 1 0 0 0
> 7 0 0 0 0
> 8 0 0 0 0
> 9 0 0 0 0
> 10 0 0 0 1
>
> I need to make 5 different sample with 5
2009 Aug 21
5
splitting a string up
x <- "1041281__2009_08_20_.lev"
I would like to split this string up and only extract the leading numbers.
1041281
to use as a label for a data column in a bigger for loop function to
read in data.
regards,
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us
2009 Jan 15
3
Bar Plot ggplot2 Filling bars with cross hatching
#I am putting a test together for an introductory biology class and I
would like to put different cross hatching inside of each bar for the
bar plot below
color <- c("Brightly Colored", "Dull", "Neither")
lizards <- c(277, 70, 3)
liz.col <- data.frame(color, lizards)
qplot(color, lizards, data=liz.col, geom="bar", ylab="Observed
Matings",
2008 Sep 11
3
periodicity validation
There is a series of data contains time in fixed step and energy
varying with time, how to test its periodicity?In R, it seems there is
no direct tools since I have search the R manual with periodic and I
have not found any related topic.
Thanks a lot
2009 Aug 13
3
split number in a vector and then make a chron object out of it
These are date and times in the format YYYYMMDDhhmmss. I would like
to take this column and make a chron object form them. I have tried a
couple of the split family of functions but they need character input
here is the data:
date.time <- c(19851001001500, 19851001003000, 19851001004500, 19851001010000,
19851001011500, 19851001013000, 19851001014500, 19851001020000,
19851001021500,
2008 Aug 18
4
Multiple Plotting help (lines don't always connect)
d <- structure(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, NA, NA, NA, 14), .Dim = c(14L, 2L
), .Dimnames = list(NULL, c("a", "b")))
plot(d, type="b")
This is simplified, but Is there an option I am missing that will
force all of the points to be joined by a line?
Stephen Sefick
--
Let's not spend our time and resources
2008 Aug 15
3
ylab with an exponent
plot(1,2, ylab= paste("insects", expression(m^2), sep=" "))
I get insects m^2
I would like m to the 2
what is the problem?
--
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being
2008 Nov 04
2
Zoo seems to be running slow in R 2.8.0 windows
R version 2.8.0 (2008-10-20)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] StreamMetabolism_0.01 chron_2.3-24 zoo_1.5-4
loaded
2008 Jan 21
4
Stationarity of a Time Series
Does anyone know of a test for stationarity of a time series, or like
all ordination techniques it is a qualitative assessment of a
quantitative result. Books, papers, etc. suggestions welcome.
thanks
Stephen
--
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are
2008 Apr 08
3
simple graphing question
#copy and paste this into R
f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702,
0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN",
"RM"), class = "data.frame", row.names = 25:29))
plot(f$TKN~f$RM, type="b")
I would like to reverse the X-Axis. How do I do this?
--
Let's not spend our time and resources
2008 Dec 02
2
ggplot2 45deg axis labels
I would like to rotate the axis labels 45 deg.
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being mammals.
-K. Mullis
2011 Mar 31
2
Linear Model with curve fitting parameter?
I have a model Q=K*A*(R^r)*(S^s)
A, R, and S are data I have and K is a curve fitting parameter. I
have linearized as
log(Q)=log(K)+log(A)+r*log(R)+s*log(S)
I have taken the log of the data that I have and this is the model
formula without the K part
lm(Q~offset(A)+R+S, data=x)
What is the formula that I should use?
Thanks for all of your help. I can provide a subset of data if necessary.
2009 Nov 30
2
Ubuntu tcl/tk problems
Error in firstlib(which.lib.loc, package) :
Tcl/Tk support is not available on this system
Error : package 'tcltk' could not be loaded
Ubuntu 9.10
I have both the 8.5 and 8.4 tcl and tk regular and dev libraries
installed. I need both of these because some of my GIS software
requires the 8.4 libraries. Should I remove the 8.5 libraries, or ...
All help is greatly appreciated!
2010 Aug 03
2
subset based on column names and then subset based on the inverse (grep?, or...)
I would like to be able to grab x and y columns out of a dataframe and
then grab all of the columns that are not equal to x or y. I am sure
that I am missing something easy.
ftbr_UTM_downstream <- (structure(list(site =
c("Jennie_Creek_Main_Stem", "Wolf_Pit_Creek_Main_Stem",
"Little_Rockfish_Main_Stem_North", "Big_Muddy_Creek_Main_Stem",
2010 Feb 18
3
row indexes from logical statment
Is there any easy way to pull out the row indexes for a logical
matching statment?
#################example code#########################################
foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25),
rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100))
#this is what I want but I would like the row indexes
2008 Sep 20
1
fitting a hyperbole
I have got a data set that is Gross Primary Productivity ~ Total
Suspended Solids it is a hyperbola just like:
plot(1/c(1:1000))
how do I model this relationship so that I can get all of the neat
things that lm gives residuals etc. etc. so that I can see if my
eyeball model stands up. Thanks for any help, pointers, or good
things to read.
--
Stephen Sefick
Research Scientist
Southeastern
2008 Aug 28
1
abline of an lm fit not correct
mac osx 10.5.4
R 2.7.1
I have fit a model
d<-lm(y~x)
with an R^2 of 0.963
but when I issue the command
abline(d)
the line is below where it ought to be. Looks like the right slope,
but not the right intercept.
thanks
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources thinking about things that are
so little or so large
2008 Oct 23
1
Reversing xlim qplot
I would like to be able to reverse the xlim on qplot
this is the code that I am using
qplot(a[,"River.Mile"], a[,26]
,ylab=colnames(a)[26], xlab="RiverMile", xlim=rev(c(60,
216)))+geom_smooth()+scale_x_continuous(breaks=c(215,202,198,190,185,179,148,119,61),