Displaying 20 results from an estimated 27 matches for "plot3".
Did you mean:
plot
2007 May 31
4
Aggregate to find majority level of a factor
I want to use the aggregate function to summarize data by a factor (my
field plots), but I want the summary to be the majority level of another
factor.
For example, given the dataframe:
Plot1 big
Plot1 big
Plot1 small
Plot2 big
Plot2 small
Plot2 small
Plot3 small
Plot3 small
Plot3 small
My desired result would be:
Plot1 big
Plot2 small
Plot3 small
I can't seem to find a scalar function that will give me the majority
level.
Thanks in advance,
Jonathan Thompson
2010 Aug 20
3
if-else function
...ining counts of
variables (here parasites). If a plot has a count equal or higher than
4 for any parasite the function should return a 1 else a 0. Later I
can loop the function over all plots.
Here I have a little subset of my data:
VariablePAR Plot1 Plot2
Plot3 Plot4
ParasiteA 3 1 1 4
ParasiteB 1 2 3 5
ParasiteC 2 1 1 3
ParasiteD 2 1 1 4
ParasiteE 4...
2012 Oct 31
2
how can xyplot word when with for control flow
...some of my data file are shown as follow.
Would someone please tell me where my code is wrong and how can make the
code right?
Thanks.
Best regards
Yuanzhen Lin
Code:
library("lattice")
plot.data$Fam<-as.numeric(plot.data$Fam)
#### xyplot can work if one by one in Fam ####
plot3.data<-subset(plot.data,Fam==1)
heading=paste("Fam_",1)
xyplot(rank ~ ca, data=plot3.data, groups=Spacing,
type="o",main=heading)
###### the following code for control flow doesn't work ####
for (i in 1:3){
plot3.data<-subset(plot.data,Fam==i)
heading=...
2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par
command. For example I have 7 plots, but instead of arranging them in
the default way
plot1 plot2 plot3
plot4 plot5 plot6
plot7
I want them in this order
plot1 plot2 plot3
plot4 plot5 plot6
plot7
Could somebody tell me how to do this, please? Thanks so many.
Suyan
2005 Dec 26
4
lme X lmer results
Hi,
this is not a new doubt, but is a doubt that I cant find a good response.
Look this output:
> m.lme <- lme(Yvar~Xvar,random=~1|Plot1/Plot2/Plot3)
> anova(m.lme)
numDF denDF F-value p-value
(Intercept) 1 860 210.2457 <.0001
Xvar 1 2 1.2352 0.3821
> summary(m.lme)
Linear mixed-effects model fit by REML
Data: NULL
AIC BIC logLik
5416.59 5445.256 -2702.295
Random effects:
Formula:...
2012 May 10
6
averaging two tables (rows with columns)
.... It should not be so hard, I think.
I have very big data but I have created a hypothetical data for simplification.
for example
I have : table 1
table 1: species occurance data
speciesX
speciesY
speciesZ
speciesXX
Plot1
1
0
1
0
Plot2
0
1
1
0
Plot3
0
0
0
1
Plot4
1
0
1
0
Table 2
table 2. species tolerance data
EnviA
EnviB
EnviC
speciesX
0.21
0.4
0.17
speciesY
0.1
0.15
0.18
speciesXX
0.14
0.16
0.19
You may noticed that table 2 does not have species Z which was in table...
2012 Dec 13
3
Repeat elements of matrix based on vector counts
....id" is repeated in the 1st df (all plots are repeated
a different number of times). My example dfs are below:
************************************************************************************************
df1 <- data.frame(plot.id = rep(c("plot1", "plot2", "plot3"),
c(3,2,5)),
tree.tag = c(111,112,113,222,223,333,334,335,336,337))
df2 <- data.frame(plot.id = c("plot1", "plot2", "plot3"), load=c(17,
6, 24))
********************************************************************************************...
2009 Apr 14
2
subset dataframe by rows using character vector?
...ataframe which returns a character vector called "plot". I have another dataframe from which I want to subset or select only those rows that match "plot". I've tried subset, and also the "which" command.
plot <- c("plot1", "plot2", "plot3") # character vector used to select rows from data
# create fake data from to try out subset
v1 <- c(2,5,6,4,3)
PLOTID <- c("plot1", "plot2", "plot3", "plot4", "plot5")
full.data <- cbind(v1, PLOTID)
full.data <-...
2008 Jan 12
2
Lattice equivalent of par(mfrow = )
Dear r-helpers,
Does anyone have a straightforward example of putting together three
unrelated (expect for a common y-axis) xyplot() figures in what would
be in base graphics a par(mfrow = c(1, 3)) arrangement?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102
2011 Mar 08
4
beamer overlays with Sweave?
...tion (even a hack) for creating multiple (overlay) plots in an
Sweave file and post-processing the overlays in beamer appropriately.
For example, suppose I have a series of figure blocks in my .Rnw file:
<<plot1,fig=TRUE>>=
[stuff]
@
<<plot2,fig=TRUE>>=
[stuff]
@
<<plot3,fig=TRUE>>=
[stuff]
@
These three blocks create three figures that I want to have appear as
a series of overlays in the final PDF file.
Sweave outputs the following LaTeX code:
\includegraphics{plot1}
\includegraphics{plot2}
\includegraphics{plot3}
and I need to turn it into
\only&...
2007 Dec 17
1
ggplot-How to define fill colours?
...w to get this?
Thanks in advance,
Pedro
============================================
my code:
>plotdata1<-data.frame(x=rep(factor(1:4),4), y=rep(0.1*(1:4),4),
+group=as.character(rep(c('white', 'red', 'blue', 'green'),rep(4,4))))
>plot0<-ggplot()
>plot3<-plot0+layer(data=plotdata1, mapping=aes_string(x='x',y='y',
+fill='group'),geom='bar', stat='identity', position='stack')
>print(plot3)
2011 Jul 19
5
multiple plots in single frame: 2 upper, 1 lower
Hi,
par(mfrow = c(2,2))
will create a 2x2 window that I can use to plot 4 diferent figures in:
[plot1 plot2]
[plot3 plot4]
But how can do 3 so that the bottom spans the width of the upper two:
[plot1 plot1]
[p l o t 3]
Is this possible in R?
--
View this message in context: http://r.789695.n4.nabble.com/multiple-plots-in-single-frame-2-upper-1-lower-tp3679574p3679574.html
Sent from the R help mailing lis...
2013 Jun 23
1
Fault geology xyz to raster
Hi,
I have a 3-d geology problem. I have an xyz fault data set. I am able to
view the data set in R using plot3-d but cannot create a raster from it. I
need to create a raster and export so that it can be read in arcscene. Can
anybody help?
Thanks
--
Shane
[[alternative HTML version deleted]]
2011 Jul 11
1
plot means ?
Hi,
I need this plot:
given: x,y - numerical vectors of length N
plot xi vs mean(yj such that |xj - xi|<epsilon)
(running mean?)
alternatively, discretize X as if for histogram plotting and plot mean y
over the center of the histogram group.
is there a simple way?
thanks!
--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031
http://thereligionofpeace.com
2007 Dec 09
1
Saving lattice plot as a PDF
...series of lattice plots as a PDF,
this is my code so far:
windows(height=8,width=6)
plot.new()
library('grid')
lattice.options(layout.heights=list(top.padding=list(x=0.15,
units="inches")))
print(plot1, split=c(1,1,2,3), more=TRUE)
print(plot2, split=c(1,2,2,3), more=TRUE)
print(plot3, split=c(1,3,2,3), more=TRUE)
print(plot4, split=c(2,1,2,3), more=TRUE)
print(plot5, split=c(2,2,2,3), more=TRUE)
print(plot6, split=c(2,3,2,3), more=FALSE)
ltext(grid.locator(), label='text', cex=1.3)
ltext(grid.locator(), label='text', cex=1.3)
And when I open the PDF created I...
2006 Oct 04
1
Some questions about plotting with R
Greetings list,
I'm currently in the process of migrating some Matlab code to R. It's
going well, but I'm running into trouble with plotting. There are a
few questions I have.
1) Is there any way to do a 3D line plot in R? This would be what the
Matlab function plot3 does.
2) I would like to create 3 separate plots. With Matlab, this is done
by doing ...
figure;
plot...
figure;
plot...
figure;
plot...
In R, I've found the function frame(), which I thought would do
something similar. However, calling frame() seems to have no effect,
as only 1 frame i...
2009 Jul 27
1
Cross-validating two matrices
...s so that they include only the species found in both. In this
case, the two matrices would therefore include only sp1,sp4,sp5.
Thank you so much for any suggestions!
E.g.:
Matrix 1:
Trait1
sp1 1.0
sp2 1.2
sp4 3.1
sp5 4.0
sp7 4.5
Matrix 2
sp1 sp3 sp4 sp5 sp6
plot1 1 2 5 1 0
plot2 3 0 1 2 5
plot3 1 1 2 3 1
plot4 0 1 2 1 0
Brian C. McCarthy, Ph.D.
Professor of Forest Ecology
Dept. of Environmental & Plant Biology
317 Porter Hall
Ohio University
Athens, OH 45701-2979 USA
T: 740-593-1615
F: 740-593-1130
E: mccarthy at ohio.edu
W: http://www.plantbio.ohiou.edu/index.php/directory/facul...
2012 Nov 27
1
Plot from a jpeg
Hi all,
I know that I can for instance draw to plots in one using
nf<-layout(matrix(c(1,2),1,2,byrow=FALSE))
Imagine I have 3 files:
plot1.jpeg
plot2.jpeg
plot3.jpeg
Anyone knows if I can read them and put on one colum and three rows reading
directly from the jpeg file?
Many Thanks
[[alternative HTML version deleted]]
2003 Oct 22
1
0-only-rows in correspondence analysis
...species empty" plots in a correspondence
analysis.
I tried to do a community structure analysis with a ca via decorana(), ca()
and CAIV(), but none of them allow 0 only-rows.
I have species (abs./pres) in columns and sites in rows
sp1 sp1 sp3 ...
plot1 0 1 1
plot2 0 0 0
plot3 1 0 1
.....
but on some plots no species could be found, therefore only 0 appear. I know
that this isn't interesting for a community analysis but I am interested in
the contributions of variables to the factors for a further analysis with
env. variables where it is interesting that...
2013 Jan 22
1
How to remove the vertical space between two graps
...rix(a,nrow=2)
m[2,]<-(-1)*m[2,]
barplot(m,horiz=T,beside=T)
and the plot obtained is showed in "plot2.tiff"
in the second attempt I'm able to place the bars next to each other
using "beside=T" argument. However, I fail when I use "beside=F"
argument (obtained plot3.tiff with this).
Can you suggest me in achieving my goal (similar to plot2 with no
vertical space)?
Regards,
Purna