search for: site4

Displaying 18 results from an estimated 18 matches for "site4".

Did you mean: site
2005 Feb 09
4
subset
...n the first column in the subset. Does anyone know how to extract all species that don't have rowSums equal to zero? Here it is: # dataset x <- data.frame( species=c("sp.1","sp.2","sp.3","sp.4"), site1=c(2,3,0,0), site2=c(0,0,0,0), site3=c(0,1,0,6), site4=c(0,0,0,0)) #I want extract the matrix: species site1 site2 site3 site4 sp.1 2 0 0 0 sp.2 3 0 1 0 sp.4 0 0 6 0 #extract data.frame of rowSums with x[,2:4] != 0 subset (x, apply (x,1,function(row) all(rowSums(x[,2:4] !=0)) ## don't work...
2006 Aug 29
1
Bootstraping for groups and subgroups and joing with other table
...Bahia Site1 Spp01 9.99 Bahia Site2 Spp01 0.72 Bahia Site2 Spp02 6.63 Bahia Site2 Spp02 3.41 Bahia Site2 Spp01 8.85 Bahia Site2 Spp01 8.13 Bahia Site3 Spp02 4.41 Bahia Site3 Spp01 9.49 Bahia Site3 Spp02 6.77 Bahia Site3 Spp02 0.64 Bahia Site4 Spp01 6.97 Bahia Site4 Spp03 8.34 Bahia Site4 Spp01 5.46 Bahia Site4 Spp01 5.52 Bahia Site5 Spp01 5.37 Bahia Site5 Spp02 8.66 ====== Table 2 - Attributes of SamplePlot State SamplePlot Area Bahia Site1 10 Bahia Site2 25 Bahia...
2011 Feb 06
2
Subsampling out of site*abundance matrix
...360, 300, 0, 600, 0) abund2 <- matrix(data=abund1, nrow=4, ncol=7) colnames(abund2) <- c("spA", "spB", "spC", "spD", "spa", "spF", "spG") rownames(abund2)<-c("site1", "site2", "site3", "site4") ##### > abund2 spA spB spC spD spa spF spG site1 150 150 150 150 0 300 300 site2 300 300 0 0 300 300 0 site3 0 0 60 540 0 0 600 site4 360 240 0 0 240 360 0 How can I make a random subsample of 100 individuals from the abundances given for each site? This...
2006 Sep 26
1
How to "Pack" a matrix
Hello, Suppose I have a matrix a where a= sp1 sp2 sp3 sp4 sp5 sp6 site1 1 0 1 1 0 1 site2 1 0 1 1 0 1 site3 1 1 1 1 1 1 site4 0 1 1 1 0 1 site5 0 0 1 0 0 1 site6 0 0 1 0 1 0 And I want to pack that matrix so that the upper left corner contains most of the ones and the bottom right corner contains most of the zeros so that matrix b is b= sp3 sp6 sp4 sp1 sp2 sp5 site1 1 1 1 1 0 0 site2 1 1 1 1 0 0 site3 1 1 1 1 1 1...
2012 May 14
2
How to interpret an ANOVA result?
...do an ANOVA to make this more quantitative: > summary(lm(d ~ site*pos) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1378.000 3.078 447.672 < 2e-16 *** site2 11.500 4.353 2.642 0.02466 * site3 12.000 4.353 2.757 0.02025 * site4 17.000 4.353 3.905 0.00294 ** site5 1.000 4.353 0.230 0.82294 posR 4.500 4.353 1.034 0.32561 site2:posR -4.000 6.156 -0.650 0.53050 site3:posR -10.500 6.156 -1.706 0.11890 site4:posR -5.500 6.156 -0.893 0.39264 site5:po...
2006 Aug 29
0
En: Bootstraping for groups (right data tables)
...3,Spp01,3.16 RioJaneiro,Site3,Spp03,6.29 Bahia,Site1,Spp01,7.30 Bahia,Site1,Spp01,2.21 Bahia,Site2,Spp01,4.69 Bahia,Site2,Spp02,5.02 Bahia,Site2,Spp02,5.37 Bahia,Site2,Spp01,2.62 Bahia,Site2,Spp01,0.74 Bahia,Site3,Spp02,0.60 Bahia,Site3,Spp01,3.07 Bahia,Site3,Spp02,5.25 Bahia,Site3,Spp02,5.02 Bahia,Site4,Spp01,8.80 Bahia,Site4,Spp03,2.39 Bahia,Site4,Spp01,2.47 Bahia,Site4,Spp01,1.70 Bahia,Site5,Spp01,8.33 Bahia,Site5,Spp02,1.81 Table2 - SamplePlot Attributes State,SampleSite,Area Bahia,Site1,10 Bahia,Site2,25 Bahia,Site3,70 Bahia,Site4,15 Bahia,Site5,5 RioJaneiro,Site1,32 RioJaneiro,Site2,...
2006 Oct 13
3
multiply two matrixes with the different dimension column by column
...ist(c("A","B","C","D"), c("stage1","stage2","stage3"))) Y<- matrix(1:28, nrow=4, ncol=7, dimnames=list(c("A","B","C","D"), c("site1","site2","site3","site4","site5", "site6","site7"))) I would like to multiply first column of the "Y"matrix (site1) to the all of the columns in "X"matrix. Then, the product will be three new columns (for example:site1stage1, site1stage2 and site1stage3 or someth...
2009 Feb 03
1
overlaying plots from a list of data frames
...dered", "factor" )), data = c(0.0297773868339168, 0.0212836833675155, 0.0301490879766663, 0.000944393402486824, -2.70247618264114e-09, -2.84624718656657e-07, NaN)), .Names = c("year", "data"), class = "data.frame", row.names = c(NA, -7L)), site4 = structure(list(year = structure(1:5, .Label = c("2000", "2001", "2002", "2003", "2004"), class = c("ordered", "factor" )), data = c(0.000418478048104973, 0.00530609034999336, 0.020077837088374, 0.0326921217142046, NaN)), .Nam...
2018 Apr 18
3
How to replace numeric value in the column contains Text (Factor)?
...the column of the table is a factor (not numeric). Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA> do you have any suggestions for me? dat<-structure(list(Sites = structure(1:5, .Label = c("Site1", "Site2", "Site3", "Site4", "Site5"), class = "factor"), temp = c(14, 15, 12, 12.5, 17), precip = structure(c(3L, 4L, 5L, 2L, 1L), .Label = c("15", "34", "high", "low", "medium"), class = "factor")), .Names = c("Sites", "temp...
2007 Jul 07
2
random sampling with some limitive conditions?
I want to gain thousands of random sampling data by randomizing the presence-absence data. Meantime, one important limition is that the row and column sums must be fixed. For example, the data "tst" is following: site1 site2 site3 site4 site5 site6 site7 site8 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 sum(tst[1,]) = 3, sum(tst[,1])=4, and so on. When I randomize the data, the first row sums must equal to 3, and the first column sums must equal t...
2007 Aug 13
3
Very new - beginners questions
Dear all, I have 4 sites and want to determine how different they are from each other. For this I have decided to use R though it seems a bit daunting to learn. I have read data in from a CSV the structure is : Species1 Species2 Species3 Site1 4 4 7 Site2 3 1 0 Site3 0 99 6 Site4 75 3 33 There are many more species than shown above this is just an example. Here are the questions. How do I read one row of data so as to load site2 into a variable called site2? Once I plot a graph using ordiplot how do I extract it from R so that I can put it into a Word for Windo...
2018 Apr 18
0
How to replace numeric value in the column contains Text (Factor)?
...the column of the table is a factor (not numeric). Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA> do you have any suggestions for me? dat<-structure(list(Sites = structure(1:5, .Label = c("Site1", "Site2", "Site3", "Site4", "Site5"), class = "factor"), temp = c(14, 15, 12, 12.5, 17), precip = structure(c(3L, 4L, 5L, 2L, 1L), .Label = c("15", "34", "high", "low", "medium"), class = "factor")), .Names = c("Sites", "temp...
2006 Oct 12
3
Cross two dataframe
Dear r-users! I would like to cross two data frame which have the same row number but different in the number of column. Can anybody help me for this case ? Thanks a lot in advance -------------------------------------------------------------------------------- Majid Iravani PhD Student Swiss Federal Research Institute WSL Research Group of Vegetation Ecology Z?rcherstrasse 111
2011 Nov 01
1
Multiple time series with zoo
...n the code as above for 6 different sites (column 1 is the "site" index). I still think in excel, so I was planning on lining up all 6 sites in a spreadsheet so that the dates (daily means from the above code) line up, and then just averaging the data like so: Date, Site1, Site2, Site3, Site4, Site5, Site6 Average 2006-04-09 ,20,19,20,19,14,12,average(Site1-6) 2006-04-10,12,13,14,15,16,12 ,average(Site1-6) 2006-04-11,12,12,12,13,12,12 , average(Site1-6) 2006-04-12,12,13,13,12,12,12, average(Site1-6) But I figure R can do this for me, so why bother going back to excel when R is turni...
2010 Apr 13
0
dbFD computing distinct species wrong?
..."F2", "F3", "F4") # functional categories fd # note that spA and spB have identical functional coding comm <- matrix (c(1,0,1,0, 1,0,1,0, 0,1,1,0, 0,1,0,1), nrow=4, ncol=4) rownames (comm) <- c("site1", "site2", "site3", "site4") colnames (comm) <- c("spA", "spB", "spC", "spD") comm # note that site 1 has only spA and spB, so I'd expect it to # have sing.sp = 0 (no singular species) require (FD) ex1 <- dbFD (fd, comm, w.abun = FALSE, corr="cailliez&quot...
2005 Jun 16
1
mu^2(1-mu)^2 variance function for GLM
...n 3Q Max -3.23175 -0.65385 -0.09426 0.46946 1.97152 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -7.92253 0.44463 -17.818 < 2e-16 *** site2 1.38308 0.44463 3.111 0.00268 ** site3 3.86013 0.44463 8.682 8.18e-13 *** site4 3.55697 0.44463 8.000 1.53e-11 *** site5 4.10841 0.44463 9.240 7.48e-14 *** site6 4.30541 0.44463 9.683 1.13e-14 *** site7 4.91811 0.44463 11.061 < 2e-16 *** site8 5.69492 0.44463 12.808 < 2e-16 *** site9 7.06762 0.44463 1...
2012 Sep 24
3
List creation based on matrix
Hi guys, It would be great if you could help me with this one... I'm looking to create a script to convert a matrix of species abundance e.g: <http://r.789695.n4.nabble.com/file/n4643978/species_matrix.jpg> into two vectors e.g: <http://r.789695.n4.nabble.com/file/n4643978/communitylist.jpg> ---------------- If you feel there is no easy answer to this and that it would be
2005 Nov 03
4
merging dataframes
Dear List, I often have to merge two or more data frames containing unique row names but with some columns (names) common to the two data frames and some columns not common. This toy example will explain the kind of setup I am talking about: mat1 <- as.data.frame(matrix(rnorm(20), nrow = 5)) mat2 <- as.data.frame(matrix(rnorm(20), nrow = 4)) rownames(mat1) <- paste("site",