Displaying 20 results from an estimated 30000 matches similar to: "one question about the loop"
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]]
2008 Jul 22
1
data transformation
Dear all,
how can I, with R, transform a presence-only table (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)) into a
presence-absence (0/1) matrix of species occurrences across sites, as
given in the below example?
Thanks a lot for your help!
Christian
My initial table:
species lat lon
sp1 10 10
2012 Oct 06
2
Presence/ absence data from matrix to single column
I've been trying to reshape this database but haven't succeed at it. I
tried using loops but can't get it right. I just want to reshape my
database from this matrix, to the one below, with only one column of data.
Year Route Point Sp1 Sp2 Sp3 2004 123 123-1 0 1 0 2004 123 123-2 0 1 1
2004 123 123-10 1 1 0 Year Route Point 2004 123 123-1 Sp1 0 2004 123
123-2 Sp1 0 2004 123
2012 May 14
2
idmap_ad partially stopped working after upgrading Samba from 3.4.3 to 3.6.3
Dear list,
upgrading from SLES11 SP1 to SLES11 SP2, I upgraded Samba from 3.4.3
to 3.6.3. I was successfully using idmap_ad to authenticate users but
after the upgrade it stopped working and users are not seen by the OS.
Obviously the users I want to see on the Linux server have all RFC2307
attributes populated and are seen by all other SLES11 SP1 servers.
I checked everything (I know) from the
2013 Sep 16
1
Solapamiento de funciones de densidad
Muchísimas gracias Carlos.
La he probado simulando datos con solapamiento conocido y va como un tiro!
Saludos
Angel
Sent from Samsung tabletCarlos Pérez Carmona <carlos.perez@uam.es> wrote:Hola Ángel,
Nosotros creamos recientemente una función para calcular el overlap entre
distintos caracteres de especies de plantas o animales. La función (trova)
puedes encontrarla aquí:
2005 Nov 27
4
Counting the occurence of each unique "charecter string"
LS,
I would really like to know how to count the frequency/occurrence of chachters inside a dataset. I am working with extreemly large datasets of forest inventory data with a large variety of different species inside it.
Each row inside the dataframe represents one individual tree and the simplified dataframe looks something like this:
num species dbh
1 sp1
2005 Nov 27
4
Counting the occurence of each unique "charecter string"
LS,
I would really like to know how to count the frequency/occurrence of chachters inside a dataset. I am working with extreemly large datasets of forest inventory data with a large variety of different species inside it.
Each row inside the dataframe represents one individual tree and the simplified dataframe looks something like this:
num species dbh
1 sp1
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
2004 Dec 21
1
write performance of Win xpp sp2
Gentlemen,
I have noticed (!) an unbelievable drop in performance with
Windows xp pro sp2 systems, compared to sp1. The performance
I have noticed is 122 seconds to write 65,000 indexed records
to a dBase type file under sp2 and the same job in sp1 is
7 seconds!! I can't believe that this is a 'normal' feature
of Windows sp2 software when working with Samba. Is it possible that
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)
>
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
2007 May 29
1
rgl.postscript
Hi,
I am having an issue when creating a postscript file from RGL window. It
seems to cut off some of the axis labels. Here is the code I am using.
I created a 3D plot using RGL_0.71 with R 2.5 on Windows XP.
z1<-c(5,4,1,4.5,2,3,2,1,1)
z2<-c(6,8,7,7.5,5,3.5,4,1,1)
z3<-c(3,2,4,7,3,4.5,6,2,3)
x1<-seq(1,9)
x2<-seq(1,9)
x3<-seq(10,18)
y1<-seq(8,0)
y2<--1*y1
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
2005 Jan 12
1
XP SP2 offline files sync delay (again)
I'm running Samba 3.0.7 on Mandrakelinux 9.2 as a PDC, with a few shares
from the PDC and more on a separate Mandrakelinux 10.0 member file
server, also running Samba 3.0.7. The passdb backend is LDAP and
clients are all Windows XP Professional SP1. Except for the below,
everything works great!
We make heavy use of offline files, and with Windows XP SP1, all is
well. However, when I
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
2005 Apr 22
3
smb ports feedback
Having read a few posts recently I thought I would do some testing.
Given XP's use of 445 and that I have a couple of networks where they only have XP clients, I thought I would try setting smb ports to 445 only rather than that suggested of just specifying 139.
This has worked well for XP clients with SP2.
However SP1, and presumably pre-SP1 clients, lose all sight of the NBT network.
2008 Feb 16
1
Joining Domain Problem only with XP SP2
I've having trouble getting XP SP2's to join a domain. Whenever I try to join,
at the point I'm asked for a user name and password with permission to join
the domain, I enter root and root's password, then get the dreaded "Unknown
user or bad password" error message.
The clients are a mixed bunch with some 98's, 1 Win2K, a few XP SP1 (I know, I
know!, but
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
2012 Oct 18
1
spTransform longlat to utm
Dear all,
I am trying to project my LongLat-maps to a plane.
The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km.
I am applying spTransform (package rgdal) and it gives my some curious results.
An example.
Let's take a point lying somewhere in Germany, zone=32U
x <- 8.968735
y <- 49.454735
After conversion I
2007 Jun 22
3
How to run "mathematica" or "c" programs in R?
I have some programs which were writen in mathematica or c language, but I
donot know how to use these software. So I want to run them in R.
Can I do it ?
How to run "mathematica" or "c" programs in R?
Jian Zhang
[[alternative HTML version deleted]]