Displaying 20 results from an estimated 10000 matches similar to: "plot a list"
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),
2008 Oct 29
1
Macro stuff to work on up through august 2007
Title says it all remember cast() with sum as the aggregation function
--
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 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 Nov 09
1
maptools sunrise sunset function
##This is a function that I am trying to write to calculate sunrise
and sunset and works "mostly", but returns nonsensical values. What
am I #missing? Thanks in advance.
###remember to include maptools as dependence###
library(maptools)
sunrise.set <- function(lat, long, date, timezone="UTC", num.days=1){
#this needs to be long lat#
lat.long <- matrix(c(long, lat),
2008 Oct 22
1
plotting matrix
a <- c(1:26)
b <- rnorm(25)
e <- rnorm(25)
f <- rnorm(25)
g <- data.frame(b,e, a,f)
I would like to plot a agianst all possibilities and then shoot it out
to a pdf one graph per page. I think it would be okay to have this as
a lattice plot or a ggplot with many graphs per page. I can figure
all of that out I think, but I need something like
r <- as.matrix(g)
plot(.~a, data=r)
2008 Oct 06
1
easier way to do this without a loop? (successive euclidean distances between points)
a <- c(1:10)
b <- c(.5, .6, .9, 10, .4, 3, 4, 9, 0, 11)
d <- c(21:30)
z <- data.frame(a,b,d)
library(fields)
results <- c()
for(i in 1:(length(rownames(z))-1)){
results[i] <- rdist(z[i,], z[(i+1),])
}
results.1 <- data.frame(results)
f <- rownames(z)
r <- f[-1]
rownames(results.1) <- r
colnames(results.1) <- f[1]
this does what I want it to do - is
2008 Oct 19
1
zoo in ggplot2
library(zoo)
d<-(structure(c(1.39981554315924, 0.89196314359498, 0.407816250252697,
0.823496839063978, 1.14429021220358, 1.23971035967413, 0.960868900583432,
0.927685306209829, 1.22072345292821, 0.249842897450642, 1.00879641624694,
0.925372139878243, 0.317259909172362, 0.382677149697482), index =
structure(c(11808,
11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631,
12753, 12996,
2008 Oct 13
1
ggplot faceting like lattice | variable
I would like to be able to do the xyplot in ggplot below. I read in
the archive that Hadley was working on this for the next release, and
I can not find the documentation (Aug. 23rd).
River.Mile <- c(215 ,202, 198, 190, 185, 179, 148, 119, 61)
Cu <- rnorm(9)
Fe <- rnorm(9)
Mg <- rnorm(9)
Ti <- rnorm(9)
Ir <- rnorm(9)
r <- data.frame(River.Mile, Cu, Fe, Mg, Ti, Ir)
z <-
2008 Sep 24
2
lattice xyplot symbols instead of colors and legend matching plot symbols or colors
I would like to use the data below where the plots are close to what I
want. Instead of color I would like to use different symbols, and
have the symbols in the legend match the graphs. I am also going to
add a regression line to these I know about the type="r" (which is
fine for these particular graphs) argument, but it fits the subsets
instead of the entire data set-- should I use a
2008 Sep 03
1
many correlations
I have one hundred and six independent variable that I would like to
preform a correlation analysis on. Is there anyway to only get the
values that are abolute value 0.6 or greater.
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 that all they really do for us is
2008 Sep 15
4
getting data into correct format for summarizing ... reshape, aggregate, or...
I would like to reformat this data frame into something that I can
produce some descriptive statistics. I have been playing around with
the reshape package and maybe this is not the best way to proceed. I
would like to use RiverMile and constituent as the grouping variables
to get the summary statistics:
198a 198b
mean mean
sd sd
... ...
etc. for all of these.
I have tried
2008 Sep 22
1
as.day() Function (zoo question)
I am was going to look at the as.yearmon function in the zoo package
and write a as.day function to aggregate a time series of 96
observations per day into the mean for each day, but I don't know how
to look at the code so that I can convert it into something I can use.
On top of that I believe that it is probably an S3 method and I
haven't quite gotten that far in my programming
2008 Oct 31
1
reshape bug?
Hadley et al.,
I was using the cast function to reshape some data (aggregate a melted
data frame) and I did not put in the fill and for the most part the
values that came out were fine, but there were value great than an
order of magnitude from the actual value. When I put in the fill
argument everything is okay. I don't provide a reproducible example
because the data set is to large to post
2008 Oct 20
5
Staging area for data before read into R
I am wondering if there is a better alternative than Excel for data
storage that does not require database knowledge (I will eventually
have to learn this, but it is not on my immediate todo list). I need
something that is not limited to 256 columns... I don't need any of
the built in functions in excel just a spreadsheet like program with
cells that hold data in a data.frame format for a
2008 Oct 01
3
for loop question Documentation and its application for calculating euclidean distance on MDS ordination axis scores
?for doesn't return anything help.search("for") doesn't return anything-
Is the for loop so prevelant in computer programing that the
documentation is implicit or is R paradigm to discourage the use of
the for loop.
I will post data probably tonight, but here is my problem. I have
preformed an MDS on a set of data. I have the scores of the four axes
that
are the optimal
2008 Nov 11
2
strsplit (regex)
#how do I break these up into first two letters (RM), number, and then
the last part
#is there an easily accessible regex tutorial on the internet?
v = (structure(1:122, .Label = c("RM215Temp", "RM215SpCond", "RM215DO.Conc",
"RM215Depth", "RM215pH", "RM215ORP", "RM215Turbidity.", "RM215Battery",
"RM215DO.",
2008 Oct 17
1
ggplot2 scale relation free
I don't know if there is a way to use the scale relation free argument
in ggplot2 like in lattice. I have a feeling that there is not, but I
would like to make a plea for this feature. It would be nice to be
able to plot Total Inorganic Nitrogen Total Phosphorus and the ratio
of the two- the numbers on the axis are not related, but the previous
two are surely related to the last (this ratio
2008 Oct 10
2
ggplot adding points
I would like to do the following in ggplot:
what am I missing?
River.Mile <-c(202, 198, 190, 185, 179, 148, 119, 61)
TSS <- c(1:8)
DOC <- seq(2, by= 0.6, length.out=8)
z <- data.frame(River.Mile, TSS, DOC)
xyplot(TSS+DOC~River.Mile, data=z, auto.key=TRUE)
thanks
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources