Displaying 20 results from an estimated 3000 matches similar to: "shading between two smoothed curves"
2008 May 29
1
plotting zoo using datetime as xlim
is there a way to use the actual index value for plotting zoo objects
this is the way that the index is set up and a sample range of what I would
like to plot
01/01/06 00:00:00 - 01/01/06 23:45:00
{
library(zoo)
# chron
library(chron)
fmt.chron <- function(x) {
chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x))
}}
x <- structure(c(15.57, 15.5,
2013 Aug 26
2
Partial correlation test
Dear all,
I'm writing my manuscript to publish after analysis my final data with
ANOVA, ANCOVA, MANCOVA. In a section of my result, I did correlation of my
data (2 categirical factors with 2 levels: Quantity & Quality; 2 dependent
var: Irid.area & Casa.PC1, and 1 co-var: SL). But as some traits (here
Irid.area) are significantly influenced by the covariate (standard length,
SL), I
2009 Jul 21
3
how to use a list to create a plot
I issued the following command to obtain the std dev for each month.
psd<-numSummary(Sal, groups=month, statistics=c("sd"))
which resulted in
> psd
sd n NA
1 6.930340 9367 2319
2 7.847003 10827 1008
3 5.962308 12988 404
4
2009 Jun 08
4
increase number of ticks on x axis of dates
My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000,
etc.) from 2000 to end of 2008. The default only gives me 4 ticks. I
want more. Why doesn't this work?
sdate<-as.POSIXct(strptime(date,format="%m/%d/%Y"))
plot(ppt~sdate,type="l",ylim=c(0,47),col=1,lwd=1,pch=16,ylab="Salinity,
psu",xlab="Year",las=1,main="Duck Key
2009 May 14
1
replacing default axis labels on a plot
I have 3 columns: flow, month, and monthname, where month is 1-12, and
monthname is name of month. I can't get the plot to replace the 1-12
with monthname using ticks.lab. What am I doing wrong?
plot(flow~factor(month),xlab="Month",ylab="Total Flow per Month",
ylim=c(0,55000), ticks.lab="monthname")
Thanks
Gregory A. Graves
Lead Scientist
REstoration
2011 Feb 03
2
tapply output as a dataframe
On Mon, Apr 13, 2009 at 12:41 PM, Dan Dube <ddube-at-advisen.com> wrote:
> i use tapply and by often, but i always end up banging my head against
> the wall with the output.
The proposed solution of Dan's problem posted on R-help was:
> do.call(rbind,a)
When I use this 'solution' I get 'ERROR: second argument must be a list'. So head on wall continues.
My
2010 Sep 22
1
failure to access packages
I am helping a fellow worker get R up and running, and he has run into a peculiar problem I've not encountered in previous install situations.
>From the Rconsole menu choice, he can set CRAN mirror to USA CA2, but when he selects "load packages" a very truncated list of packages appears (many packages don't appear at all).
If he issues "chooseCRANmirror()" from the
2010 Nov 30
2
reference text variables as column name to plot
Having given myself carpal tunnel looking for answer to this ...
I have a dataset each column of which has 12 rows in it. I created a
variable 'z' as follows:
z=1:24
Since I have a large number of these plots to make, and they are a bit
complex, I want to want to reference the column I want to plot via a
variable containing the name of that column. As follows:
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964).
month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009
1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920
2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2010 Jun 10
1
nls model fitting errors
What am I failing to understand here?
The script below works fine if the dataset being used is
DNase1 <- DNase[ DNase$Run == 1, ] per the example given in
help(nlrob).
Obviously, I am trying to understand how to use nls and nlrob to fit
curves to data using R.
#package=DAAG
attach(codling)
plot(pobs~dose)
#next command returns 'step factor reduced below min factor
2010 Jul 20
1
Exporting NMDS distance matris to csv
If you submit these lines, you end up with variable "vare.dis". I want
to export vare.dis to csv. Stuck I am.
library(vegan,logical.return = TRUE) #return=true verifies package is
available
library(MASS,logical.return=TRUE) #return=true verifies package is
available
data(varespec) #varespec is an example data file in the vegan package
vare.dis <- vegdist(varespec)
2004 Oct 26
1
indexing within the function "aggregate"
Hi all,
I'm trying to work out the following problem, but I can't imagine how.
I have the following (much reduced & oversimplified) dataset
My.df <-
cbind.data.frame(PPM=c(15.78, 15.81, 15.87, 15.83, 15.81, 15.84,
15.91, 15.90, 15.83, 15.81, 15.93, 15.83,
15.70, 15.92, 15.76, 15.81, 15.91, 15.75,
15.84, 15.86, 15.82, 15.79,
2012 Nov 14
2
aggrete data from combination
Dear R users,
A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I
want all diameters values for different combination of plots.
For example I want all d values for all posible combination, 100C2 (all d
values for plot 1 with all d values in the plot 2.......with all d values
from plot 1 with all d values from plot 100, ...... with all d values from
plot 99 with all d values
2012 Dec 16
3
how to handle NA values in aggregate()
Dear All:
I am trying to calculate four columns' means in a dataframe like this:
FID MID IID EW_INCU EW_17.5 EMW EEratio
1 4621 TWF2H5 45.26 NA 15.61 NA
1 4621 TWF2H6 48.02 44.09 13.41 0.3041506
2 4630 TWF2H19 51.44 47.81 NA NA
2 4631 TWF2H21 NA 52.72 16.70
2014 Sep 01
1
Correlation Matrix with a Covariate
R Help -
I'm trying to run a correlation matrix with a covariate of "age" and will
at some point will also want to covary other variables concurrently.
I'm using the "psych" package and have tried other methods such as writing
a loop to extract semi-partial correlations, but it does not seem to be
working. How can I accomplish this?
library(psych)
> set.cor(y =
2009 Dec 15
1
shading between to curves that intersect repeatedly
Dear R-Community,
I have the following problem and was wondering whether someone could help
me out. I have a number of time series of discharge (up to 3000 data
points in some cases) which I would like to compare on the same line plot
by shading the area between some of them. Can anyone tell me how to do
that? I have tried to fiddle around with the polygon function, but the
curves interact a
2007 Oct 29
1
shading of curves with polygon
Hello again
With the poylgon function it's possible to plot shaded areas under a curve.
But somehow it connects the start and the endpoint of a line and fills whats between them. I would actually like to set the boarders of the shading by two min and max curves, but I failed.
i tried stl like:
polygon(min, max, border=0), where min and max are my curves plotet by plot(max)
lines(min)
2007 Aug 05
1
Selectively shading areas under two density curves
Dear Listers,
I am drawing a plot of two density curves, for male and female incomes. I would
like to shade/hatch/color (whatever) the areas under the curves which are
distinctive for each gender. This is the code I have tried so far:
m <- density(topmal.d$y, bw = "sj")
f <- density(topfem.d$y, bw = "sj")
par(mfrow = c(1,1))
plot(x = c(0,400), y = c(0,0.02), type =
2007 Oct 03
2
Shading area under density curves
Hello,
I have a question regarding shading regions under curves to display
95% confidence intervals. I generated bootstrap results for the slope
and intercept of a simple linear regression model using the following
code (borrowed from JJ Faraway 2005):
> attach(allposs.nine.d)
> x<-model.matrix(~log(d.dist,10))[,-1]
> bcoef<-matrix(0,1000,2)
> for(i in 1:1000){
+
2012 Nov 14
5
aggregate combination data
Dear R users,
I want to aggregate all *d *data from all combination of n *plots* taken
by k.
Thank very much!
My data is like that:
plot d 1 14 1 13 1 12 1 14 1 18 1 20 1 21 1
43 1 108 1 43 2 41 2 61 2 83 2 61 2 84 2 45 2 21 2 12 2 11 ... 100
10
100 12
--
---
Catalin-Constantin ROIBU
Forestry engineer, PhD
Forestry Faculty of Suceava