Displaying 20 results from an estimated 1000 matches similar to: "How to interpret an ANOVA result?"
2006 Aug 29
1
Bootstraping for groups and subgroups and joing with other table
Dear R-experts,
I have a table with following collumns: State, SamplePlot, Species and BodySize. I sampled bird species at 34 SamplePlots and 5 States (regions) monthly during two years. On each bird record I measured bodysize and identified the species. So I have many records of each species (about 150 species) at each SamplePlot and each Region (State).
Now I would like bootstrap
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
2006 Oct 13
3
multiply two matrixes with the different dimension column by column
Dear all,
I would like to multiply two matrixes with the different dimension column
by column. Let make an example:
If I have two matrixes "X" and "Y"as follow:
X<- matrix(1:12, nrow=4, ncol=3, dimnames=list(c("A","B","C","D"),
c("stage1","stage2","stage3")))
Y<- matrix(1:28, nrow=4, ncol=7,
2018 Apr 18
3
How to replace numeric value in the column contains Text (Factor)?
Hi R user,
Would you mind to help me on how I can change a value in a specific column
and row in a big table? but 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",
2009 Feb 03
1
overlaying plots from a list of data frames
Hello R list,
I have a list of data frames, in the form (dump output for an example
list follows message):
$site1
year data
1 2000 0.03685042
2 2001 0.02583885
6 2005 0.02480015
7 2006 0.03458745
$site2
year data
1 2002 4.071134e-03
2 2003 -4.513524e-08
3 2004 8.336272e-08
4 2005 2.270803e-08
5 2006 1.263597e-02
6 2007 NaN
I would like to plot each
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
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
2005 Feb 09
4
subset
Dear all,
I am trying to extract rows from a data.frame based on the
rowSums != 0. I want to preserve rownames in 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),
2018 Apr 18
0
How to replace numeric value in the column contains Text (Factor)?
The simplest would be to convert precip to character and then back to a factor if you really want it to be a factor. This will also remove the levels that no longer exist.
str(dat)
# 'data.frame': 5 obs. of 3 variables:
# $ Sites : Factor w/ 5 levels "Site1","Site2",..: 1 2 3 4 5
# $ temp : num 14 15 12 12.5 17
# $ precip: Factor w/ 5 levels
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello,
How can I randomly sample individuals within a sites from a site (row) X
species abundance (column) data frame or matrix? As an example, the matrix
"abund2" made below.
##### (sorry, Im a newbie and this is the only way I know to get an example
on here)
abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60,
0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
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
2011 Nov 01
1
Multiple time series with zoo
Thanks for everyone's input so far, it is greatly appreciated. But I've got
one last task I could use some advice on
Here are the first few lines of my data set:
site,time_local,time_utc,reef_type_code,sensor_type,sensor_depth_m,temperature_c
06,2006-04-09 10:20:00,2006-04-09 20:20:00,BAK,sb39, 2, 29.63
06,2006-04-09 10:40:00,2006-04-09 20:40:00,BAK,sb39, 2, 29.56
06,2006-04-09
2006 Aug 29
0
En: Bootstraping for groups (right data tables)
Dear R-friends,
Unfortunately the tables that I "past" on last email gone with bad visual structure. So I send it again. Sorry to do this so confuse.
Miltinho
====
Table1 - Bird records
State,SampleSite,Species,Bodysize
SaoPaulo,Site1,Spp01,4.39
SaoPaulo,Site1,Spp04,4.05
SaoPaulo,Site1,Spp01,2.75
SaoPaulo,Site1,Spp02,8.18
SaoPaulo,Site1,Spp02,0.80
2011 Feb 03
3
R Data Manipulation - Transposing Data by a Given Column, Like User_ID
Hello,
I'd like to transpose data to create an analysis-friendly dataframe. See
below for an example, I was unable to use t(x) and I couldn't find a
function with options like PROC TRANSPOSE in SAS.
The ideal solution handles variable quantities of SITE - but beggars can't
be choosers. :-)
Thank you in advance,
Mike
## INPUT DATA
USER_ID<-c(1,1,1,2,2,2,3,3,4)
SITE
2008 May 02
3
data transformation
Dear all,
how can I, with R, transform a presence-absence (0/1) matrix of species
occurrences into a presence-only table (3 columns) with the names of the
species (1st column), the lat information of the sites (2nd column) and
the lon information of the sites (3rd column), as given in the below
example?
Thanks a lot for your help!
Christian
my dataframe:
site lat lon spec1 spec2 spec3 spec4
2005 Jun 16
1
mu^2(1-mu)^2 variance function for GLM
Dear list,
I'm trying to mimic the analysis of Wedderburn (1974) as cited by
McCullagh and Nelder (1989) on p.328-332. This is the leaf-blotch on
barley example, and the data is available in the `faraway' package.
Wedderburn suggested using the variance function mu^2(1-mu)^2. This
variance function isn't readily available in R's `quasi' family object,
but it seems to me
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",
2005 Oct 04
2
Joining Dataframes
I am attempting to join several dataframes that summarize sampling effort
for different samples into one large data.frame/table.
I have looked at the merge command, but have not been clever enough to
figure out how to get it to do what I want.
A simplified example of what I am trying to do:
The dataframes I have look like this (they were generated using the table
command)
species1.effort
2009 Oct 28
6
Rsync and full path of filenames
Hi,
I have a bit of a tricky question about rsync.
Let's say I want to backup a bunch of configuration files with rsync, in
a script.
What I don't want to do : a full snapshot of /etc.
What I want to do : backup only those files I need, in an otherwise
empty directory tree.
In my script, I'd begin with a list of the files I effectively want to
backup. Something like :
2012 Mar 30
1
removing NA from multidmension arrays
Hi:
I'm having some difficulty properly subscripting a function to remove
complete NA rows from a R array object. Could someone please suggest how
best
to script this out?
Data structure:
X is an array with 3 dimensions (replicates, Species, Sites)
replicates: 1 to 6 but ragged...not all sites equal
,,Site1
Sp1 Sp2 Sp3... Sp50
1 5 4 3 2
2 3 0 0 1
3 NA NA NA NA
4 NA NA NA NA
5 NA