search for: shrub

Displaying 20 results from an estimated 27 matches for "shrub".

Did you mean: shrb
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of row. Example (actual list has ~200 elements): > temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04)) > temp2<- data.frame(ID=c("Herb","Shrub", > "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3)) > L<-list(a=temp1,b=temp2) > L $a ID stat pvalue 1 Herb 4 0.03 2 Shrub 5 0.04 $b ID stat pvalue 1...
2009 Jul 13
1
Help get this simple function to work...
...ate according to the loop criteria. Any obvious problems that you can see? ################Cover Function######################### #Define Variables Quadrats.df<-unique(data.df$Quadrat) TotalCover.df<-cbind(0:750/10,0,0,0,0,0,0) colnames(TotalCover.df)<- c("Station","Shrub","Tree","Invasive","Herb","Litter","Bare") Shrub.df<-data.df[data.df$Layer=="Shrub",] Tree.df<-data.df[data.df$Layer=="Tree",] Cover.fn<-function(ID){ ShrubCover.df<-Shrub.df[Shrub.df$Quadrat==ID,]...
2009 Jul 13
2
Help me get this function to work...
...pdate according to the loop criteria. Any obvious problems that you can see? ################Cover Function######################### #Define Variables Quadrats.df<-unique(data.df$Quadrat) TotalCover.df<-cbind(0:750/10,0,0,0,0,0,0) colnames(TotalCover.df)<- c("Station","Shrub","Tree","Invasive","Herb","Litter","Bare") Shrub.df<-data.df[data.df$Layer=="Shrub",] Tree.df<-data.df[data.df$Layer=="Tree",] Cover.fn<-function(ID){ ShrubCover.df<-Shrub.df[Shrub.df$Quadrat==ID,]...
2008 Aug 29
1
significance of random effects in poisson lmer
Hi, I am having problems trying to assess the significance of random terms in a generalized linear mixed model using lme4 package. The model describes bird species richness R along roads (offset by log length of road log_length) as a function of fixed effects Shrub (%shrub cover) and Width (width of road), and random effect Site (nested within Site Cluster). >From reading answers to previous posts, it seems that the consensus is to derive p-values using the neat little piece of code posted by Doug Bates as "mcmcpvalue". This code calls the merMC...
2007 May 15
1
stacked barplot with positive and negatvie values
Hello I'm trying to create a barplot with a couple of stacked positive values and with one negative value for each group. example: trees<-c(20,30,10) shrubs<-c(12,23,9) veg<-c(2,3,4) soil<-c(-100,-123,-89) example1<-t(cbind(trees,shrubs,veg)) barplot(example1) #this works so far #but now: example2<-t(cbind(trees,shrubs,veg,soil)) barplot(example2) This shows no more stacked bars. But I want to keep the bars like example1 and just...
2009 Aug 19
2
how do i vectorize relational queries in R
...bviously, I can use a loop to accomplish this. However, is there a way to vectorize it? Example: > data <- data.frame(c(1,1,1,2,2,2,3,3,3),rep(2,9)); names(data) <- > c("Sample","Score") > meta <- data.frame(c(1,2,3),c("Tree","Tree","Shrub")); names(meta) <- > c("Sample","Stratum") The following attempt at vectorizaton doesn't work: > data$Stratum <- meta$Stratum[which(data$Sample == meta$Sample)] > data$Stratum [1] Tree <NA> <NA> Tree <NA> <NA> Tree <NA> &...
2012 Nov 28
3
Conditional model in R
...I have a data set where the response variable is the percent cover of a specific plant (represented in cover classes 0,1,2,3,4,5, or 6). This data set has a lot of zeros (plots where the plant was not present). I am trying to model cover class of the plant as a function of both total nitrogen and shrub cover. After quite a bit of research I have come across a conditional approach to modeling data with a lot of zeros (Fletcher et al. 2005, Welsh et al. 1996). In this approach you model the presence/absence data using a logistic regression and then model the presence only data using ordinary (lea...
2003 Jul 22
1
Making a group membership matrix
...characters neatly should that be easier to work with.) > length(foo) [1] 314482 > foo[1:10] [1] Montane Chaparral Barren Red Fir Red Fir [5] Red Fir Red Fir Red Fir Red Fir [9] Red Fir Red Fir 39 Levels: Alpine-Dwarf Shrub Annual Grassland Aspen Barren ... White Fir > summary(foo) Alpine-Dwarf Shrub Annual Grassland Aspen 7402 0 582 Barren Bitterbrush Blue Oak-Foothill Pine 69111...
2011 Jan 09
1
Rectangle height in lattice xyplot key
...= c(0.8,0.8), cex = 0.6, title = "Functional Groups", cex.title = 0.7, columns = 1, padding.text = 4, text = list(label = c("Tree","Shrub\n(low)","Herb","Grass","Shrub\n(small)")), points = list(pch = c(1,3,4,20,16), col = c(2,3,4,5,6)), lines = list(col = c(2,3,4,5,6), size = 2)...
2006 Mar 04
1
replicated time series - lme?
Dear R-helpers, I have a time series analysis problem in R: I want to analyse the output of my simulation model which is proportional cover of shrubs in a savanna plot for each of 500 successive years. I have run the model (which includes stochasticity, especially in the initial conditions) 17 times generating 17 time series of shrub cover. I am interested in a possible periodicity of shrub cover (the time lag(s) of significant autocorrelatio...
2010 Jun 23
1
Shapefile
...value) and use "one" for presence and "zero" for absence to end up with 153 records. #wolfsub<-subset(wolves,subset=!(WOLVES_99==2)) #wolfsub <- subset(wolves.map,WOLVES_99!=2) wolfsub <- wolves.map[!wolves.map$WOLVES_99 %in% 2,];wolfsub dim(wolfsub) # 42 = Forest, 51 = Shrub, > 81 = Agriculture wolfsub$Forest<-ifelse(wolfsub$MAJOR_LC==42,1,0) wolfsub$Shrub<-ifelse(wolfsub$MAJOR_LC==51,1,0) wolfsub$Agriculture<-ifelse(wolfsub$MAJOR_LC>81,1,0) names(wolfsub);dim(wolfsub) # create the model mod1<-glm(WOLVES_99~RD_DENSITY+Forest+Shrub +Agriculture,family=...
2010 Jun 24
0
rgdal-maptools
...ression model based on WOLVES_99 and then apply to all the 5 states # Remove the WOLVES_99 2(two value) and use "one" for presence and "zero" for absence to end up with 153 records. wolfsub <- wolves.map[!wolves.map$WOLVES_99 %in% 2,];wolfsub dim(wolfsub) # 42 = Forest, 51 = Shrub, > 81 = Agriculture wolfsub$Forest<-ifelse(wolfsub$MAJOR_LC==42,1,0) wolfsub$Shrub<-ifelse(wolfsub$MAJOR_LC==51,1,0) wolfsub$Agriculture<-ifelse(wolfsub$MAJOR_LC>81,1,0) names(wolfsub);dim(wolfsub) # Create the model mod1<-glm(WOLVES_99~RD_DENSITY+Forest+Shrub+Agriculture,family=...
2010 Jun 26
1
predict newdata question
...1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), Shrub = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,...
2008 Jan 18
3
Problems with lattice plot
...I have some problems when I try to plot a lattice. The lattice has 200 columns (X value) and 5 rows (Y value), with a total of 1000 squares. I want to plot this lattice with the squares having different colours according to a variable value. The variable I want to plot is cover value of a shrub, and it has values between 0 and 1. I want to plot the squares with value 1, black, the squares with values 0, white, and the values between 0 and 1 with grey, more or less dark depending on its proximity to 1 (dark grey) or 0 (light grey). I have tried this: plot(x=transect41$x,y=transect4...
2010 Nov 09
2
new column from column in another df
...ase Populus tremula,1 Populus tremula,2 Populus tremula,3 Calluna vulgaris,1 Calluna vulgaris,2 Betula alba,1 Betula alba,2 Betula alba,3 Primula veris,1 Primula veris,2 and another df where each species only have one row: species,growth_form Populus tremula,tree Acer platanoides,tree Ribes rubrum,shrub Calluna vulgaris,dwarf_shrub Betula alba,tree Primula veris,herb ...how can I create a new column in the first data frame where growth form is picked up from the second data frame (also factors) and entered into all rows for a species as follows: species,phase,growth_form Populus tremula,1,tree Po...
2005 Mar 04
1
R: Moran's I
Hi- I would like to assign distance classes (lags) to the moran''s I test in R. I donĀ¹t have equally spaced points since I was mapping shrubs across a landscape (vs. an experiment or survey in a grid). I somehow need to select points based on the distances in the distance matrix (i.e., I need to select all pairs of points that occur 0-25 m from each other, 25-50 m, etc...). Does anyone have code or a detailed procedure for subsampl...
2008 Dec 01
1
Spatstat - K2 index
Hi all, I'm using spatstat to investigate the spatial structure of an arid shrub population. The first-order intensity of my data does not appear to be homogenous, so I would like to use inhomogeneous techniques. I realise there is a inhomogeneous K-function available in spatstat, but there doesn't not appear to be one for the pair-correlation function (O-ring statistic)....
2007 Sep 12
2
Nested anova with unbalanced design and corrected sample size for spatial autocorrelation
Hello all, This may be a simple question to answer, but I'm a little bit stumped with respect to the calculation of the F statistics in nested anovas with unbalanced design in R. In my case, I have 11 vegetation transects (with 1000 10cmx10cm squares), where we estimated shrub cover. We have two different treatments: wildfire (4 transects) and prescribed burning (7 transects) and we want to compare the mean shrub cover between the 2 different treatments. I guess that I have to apply a one-way nested anova (transect number within treatment) with unbalanced number of sampl...
2010 Jun 23
1
Plotting Data on a Map
...value) and use "one" for presence and "zero" for absence to end up with 153 records. #wolfsub<-subset(wolves,subset=!(WOLVES_99==2)) #wolfsub <- subset(wolves.map,WOLVES_99!=2) wolfsub <- wolves.map[!wolves.map$WOLVES_99 %in% 2,];wolfsub dim(wolfsub) # 42 = Forest, 51 = Shrub, > 81 = Agriculture wolfsub$Forest<-ifelse(wolfsub$MAJOR_LC==42,1,0) wolfsub$Shrub<-ifelse(wolfsub$MAJOR_LC==51,1,0) wolfsub$Agriculture<-ifelse(wolfsub$MAJOR_LC>81,1,0) names(wolfsub);dim(wolfsub) # create the model mod1<-glm(WOLVES_99~RD_DENSITY+Forest+Shrub +Agriculture,family=...
2008 Jan 15
1
error in my selection
...(xtabs(Total ~ uniqueID + cat3_name, data=x3_reg1))> ma1 cat3_name Anthropogenic Asteraceae - herb Bare ground Canopy tree Coarse woody debris Cypress knees Emergent aquatic Epiphyte Floating aquatics Grasses Herbs Ilex Midstory tree Palm Sapium sebiferum Sedge Shrub Terrestrial herb Vine WateruniqueID...