similar to: Presence/ absence data from matrix to single column

Displaying 20 results from an estimated 10000 matches similar to: "Presence/ absence data from matrix to single column"

2013 Jan 04
3
help "reshaping" dataframe
List, I want to reshape my data, but I'm not sure how to do it... it might be a simple task, but don't know which package does this. "occ.data" (see below) is how my original data are arranged, and I know that with melt() I can reshape it like "y" (see below). However, I just want to build a matrix like the "y" matrix, but with only 2 dimensions. Something
2012 Nov 09
6
(sin asunto)
Saludos, tengo un problema que no puedo resolver dentro del R Estoy creando una funcion que a partir de un objeto compuesto por diferentes matrices como el que esta a continuacion: [[1]] M1 M2 M3 M4 sp1 2 0 1 8 sp2 4 5 2 4 sp3 0 0 4 0 sp4 5 7 5 0 sp5 0 4 0 0 [[2]] M3 M2 M4 M1 sp1 1 0 8 2 sp2 2 5 4 4 sp3 4 0 0 0 sp4 5 7 0 5 sp5 0 4 0 0 [[3]]
2012 Nov 21
1
Listing elements of a 4D array
Dear list, I'm having trouble to see how my elements on a 4 dimensional array are listed. For example, I generated the following array: junk.melt=melt(occ.data,id.var=c("Especie", "Site", "Rep", "Año"), measure.var="Pres") y=cast(junk.melt, Site ~ Rep ~ Especie ~ Año) Now, I want to be able to look at how my species (Especie) are listed, in
2008 Jul 16
6
OT - Windows slowdown?
I know this isn't the right forum for this (do I ever!), but you-all know so much about everything I thought I'd ask. About two months ago I resurrected my daughter's Compaq laptop (cracked screen - replaced it) and ran an update on it. It's running Windows XP, SP1 (I think), but since the update it has run about 1/3 as fast as it used to. Does anyone know if there was a WXP
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
2019 Dec 14
2
USB dahdi fxo ?
On 12/13/19 9:28 PM, Greg Troxel wrote: > sean darcy <seandarcy2 at gmail.com> writes: > >> I'm moving asterisk to a laptop, so can't use the dahdi board. Is >> there any supported USB dahdi device ? I see the Sangoma USBfxo >> device, but the dahdi driver no longer supports it. Anything else ? > > There is also the ObiHai OBi202 with an OBiLine, which
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
2009 Jan 07
4
Another newbie question
Problem: I have a data frame with 1s and 0s denoting presence/absence of species (columns) for particular plot measurements (rows). What I want to do is make a new column whose entries for each row is a list of the column names in which a species is present (ie. for row one its entry might read: "sp1","sp2", etc.). I've tried various functions etc. but can't seem to
2006 Sep 17
2
Excluding columns from dataframe and selecting row records
Dear R-friends, I have to simple questions. First I would like to exclude some columns from a dataframe and after I need select rows that satisfy some conditions. My data frame looks like Region Species Bodysize Weigth Age Africa Sp1 10.2 20 2 Africa Sp2 12.2 12 2 Africa Sp3 15.3 18 3 Africa Sp4 11.5 40 4 Brazil Sp1 10.2 40 3 Brazil Sp2 22.2 32 2 Brazil Sp3 12.3
2007 Mar 13
3
OCFSv2 in a mail cluster environment
Hello, First, thanks to all the people who helped to license this software under the GPL. This is a very important piece of work for the Free Software in the Enterprise Market. Just a few newbie questions. We've been thinking about implmenting a mail cluster with a Fiber SAN (IBM DS-4000) and OCFSv2 as the storage backend. The information on this volume will essentially be Postfix Maildirs,
2005 Mar 14
1
calling objects in a foreloop
I want to organize outputs from several regressions into a handy table. When I try the following, each of my "fit_s" is replaces instead of read. Is there a way to read from the regression summaries that does not require writing separate lines of code for each? -Ben Osborne > fit1<-lm(dBA.spp16$sp2.dBA.ha~dBA.spp16$sp1.dBA.ha) >
2011 Sep 15
1
Creando scrips en R
Hola queridos usuarios de R-HELP-ES Primero que nada, muchas gracias a todo aquellos que me prestaron ayuda en mi anterior pregunta, fue de gran utilidad. A lo siguiente, tengo ahora otras preguntas, que bajo mis conocimientos las considero complejas, espero que me puedan ayudar, se los agradezco de antemano. Necesito realizar las siguientes operaciones (#Operación general) a un conjunto de 18
2011 May 23
2
Linear regression - several response variables vs few ind variables
Hi all, I need to run several simple linear regressions at once, using the following data. Response variables: Bird species (sp 1, sp2, sp3...spn). Independent variable: Natprop - proportion of natural area. covarate: Effort = hours). One single linear regression would be: lmSp1 <- lm(sp1~ natprop + effort). However, I need to run this linear regression for all bird species that I have
2006 May 23
2
transpose dataset to PC-ORD?
Hello: I need to take a species-sample matrix and transpose it to the format used by PC-ORD for analysis. Unfortunately, the number of species is very large (>5000), and so this operation cannot be performed simply in an application like Excel, which has a 255 column limit. So, I wrote relatively simple code in R that I hoped would do this (appended below). But there are glitches. The
2012 Nov 09
1
Fwd: Simulate nested data
I know this seems like a very easy question (and maye it is) but I've been trying to simulate nested data and been unsucessful so far.. I want to simulate a varying number of species within a group; and then create an array to store the results of my for-loop. For example: groups<-3 species$groups<-as.integer(runif(groups,1,10)) #species per functional group ###create arrays to store
2010 Feb 12
1
Need help on boxplot panel chart
Hi there: I am new to R and creating a boxplot panel chart to show a test result. I have four output variables (OV1, OV2, OV3, OV4) reflecting effects of the variation of three status parameters (SP1, SP2, SP3) on them at three different locations (Loc1, Loc2, Loc3). My plan is that displaying ONE OV change with ONE SP over three Loc in each boxplot (i.e., Loc is X axis and OV value is Y axis).
2007 Apr 01
4
Abundance data ordination in R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070401/33921c2a/attachment.pl
2009 Jul 27
1
Cross-validating two matrices
Hello, I am trying to help a colleague with an R problem (see below) to whit I can only generate a very inelegant solution. Any advice would be welcome. Thanks, Brian If you have two matrices, say a species by trait matrix (Matrix 1 below) and a plot by species matrix (Matrix 2 below), is there a straightforward way to prune one matrix so that the species list matches those in a
2012 Dec 26
1
Change class of elements in list
Dear R users, I have a list of objects of type "im" > mylist$sp1 $sp2 $sp3 and I want to convert them to a list of objects of class "SpatialGridDataFrame" This works for a single object of class "im": a <- mylist$sp1 b <- as(a, "SpatialGridDataFrame") Then I want to write each element in the new list as a TIFF file, with the name of the elements
2012 Aug 21
1
About matrix manipulation
Dear list, I'm trying to create a matrix by combining the sites that species occur in a new matrix with species as rows and sites as columns. The main matrix is "mat": mat <- as.data.frame(cbind(sp1=c(rep(0, 5), rep(1, 5)),sp2=sample(c(rep(0, 6),rep(1, 4))), fac=c(rep("a", 3), rep("b", 3),rep("c", 4)))) The first two columns are species and the