Displaying 20 results from an estimated 5000 matches similar to: "Randomizing a dataframe"
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
2004 Dec 18
4
variables - data-structure
dear R-friends,
i`ve got a large dataset of vegetation-samples with about 500
variables(=species) in the following format:
1 spec1
1 spec23
1 spec54
1 spec63
2 spec1
2 spec2
2 spec253
2 spec300
2 spec423
3 spec20
3 spec88
3 spec121
3 spec200
3 spec450
.
.
this means: sample 1 (grassland) with the species (=spec) 1, 23, 54, 63
is it possible to get a following data-structure for further
2006 Feb 25
2
Adding header lines to a dataframe that is exported using write.csv
I would like to export a dataframe to a .csv using:
>write.csv(dataframe,"dataframe.csv")
but I need to add four "header" lines to the csv that are not part of
the dataframe (which itself has a line of column headers).
The difficulty (for me, at least!) lies in the requirement that
certain elements of the header (X, Y and the number of "Q"s - please
see example
2012 Jan 24
2
reshape dataframe to array (pivot table)
Hello,
I would like to reshape a dataframe into an array. This is kind a similar task as Excel performs with a Pivot table. To illustrate it:
LOC <- factor(c(1,2,2,3,1,1))
SPEC1 <- c(0,0,23,0,12,11)
SPEC2 <- c(1,2,0,0,0,4)
df <- data.frame(LOC,SPEC1,SPEC2) # original dataframe
a <-
2006 Sep 20
3
committing multiple speculations in a single probe
While using DTrace to track down a problem recently, we came across an
unexpected restriction: the compiler will not permit different
speculations to be committed in the same instance of a probe identifier.
For instance, consider the following useless D script:
#!/usr/sbin/dtrace -s
#pragma D option nspec=2
BEGIN {
spec1 = speculation();
spec2 = speculation();
}
END {
2006 Jul 19
2
conditional plot
Hi,
Can anyone pls help me in plotting the following data?
The data-set contains company name, specification-1, specification-2.
The graph would basically plot company name with specification-1
on x-axis, & specification-2 on y-axis.
Simply put - company name should get classified into one of the
four quardrants created by specification 1 & specification2.
Thanks.
2007 Feb 25
1
nested design in lme, need help with specifying model
Hi,
I wonder if anyone can help me with specifying a right model for my analysis. I am a beginner to lme methods and though have spent already many hours studying from various books an on-line helps, I was unfortunately not able to find a solution to my problem on my own.
Data structure:
I studied escape behavior of three species of a prey to a predator. The prey specimens (many) were in a
2013 Feb 11
1
Quick start configuration sample for "chan_dahdi.conf"
I am really a beginner of PRI ISDN board, I am wondering if there is a "quick start" chan_dahdi.conf configuration I could use.
I tried to install two "FreePBX" boxes follow the instructions from "http://www.cadvision.com/blanchas/Asterisk/DahdiT1trunk.html" connected them between PRIs, It worked. And now if I refer the FreePBX "chan_dahdi.conf" it looks
2006 Jul 02
1
Calculation of lags
Hi,
If I have the follow situation:
A dependent variable (i.e. number of insects) that is affected by an
independent variable (i.e. rain). The problem is that the measure of rain
affect the population in other moment. So there exit a lag between the rain
and the number of insects. Exist in R any tool to find what is this lag?
Explain better.
Suppose that I have a linear relationship
2008 Nov 18
2
matrix for diversity functions?
Hi,
I have a small simple data frame (attached) - to compare diversity of
insects encountered in disturbed and unditurbed site. What i have is
the count of insects - the total number of times they were encountered
over 30 monitoring slots.
Can someone please check for me to make sure how the 'community data
matrix' for the diversity function needs to be oriented so that i'm
2009 Mar 13
2
Mixed model help!
Hi everyone! I am a biologist from Argentina and have to solve this problem.
I have an insect population obtained from 10 different nests and need to
know its sex ratio. But as I cannot ensure insects independence I need to
run a model where I can include the variable “nest” as with a random effect.
The response variable has a binomial distribution (males or females).
I’ve been reading for a while
2006 Aug 09
1
Improvement: SiteMapper - working ideas as a possible RoR''s routing replacement
Hello,
I''ve done potencial replacement for RoR''s routing mechanism.
It just works as an independent class so you can try bundled examples
withou installing anything else. I didn''t integrated it into Rails (as
a plugin?) because I don''t know if anyone would appreciate it etc.
SiteMapper features:
--------------------
1. uses regexp mask to get variables from
2011 Mar 08
1
NaNs in Nested Mixed Model
Dear R users,
I have a problem with something called "NaNs" in a nested mixed model.
The background is that I have studied the number of insect nymphs
emerging from replicated Willow genotypes in the field. I have 15
replicates each of 4 Willow genotypes belonging two 2 Willow species.
Now I want to elucidate the effect of Willow genotype on the number of
emerging nymphs. Previously I
2002 May 02
3
Surface Graphic
Hello list!
I have a problem with the function 'persp'. I have a data set with the
variables
X -> The X coordenate of the insect
Y -> The Y coordenate of the insect
deep-> how deep the insect buried into the soil.
I would like to have a plot with a surface simulating the way the insect
buried. Is it possible? If I type
persp(x,y,deep)
R gives me this error message
Error in
2005 Jun 02
0
[LLVMdev] Randomizing Functions & Global variables
On Thu, Jun 02, 2005 at 02:12:22PM -0700, Tanu Sharma wrote:
> By randomization of functions I mean the manner in whch they are
> called , so that has to do with address.I wish to randomize the order
> of calls made to functions when a program is run.
How would you "randomize the order of calls made to functions when a
program is run" without changing the semantics of the
2005 Jun 02
4
[LLVMdev] Randomizing Functions & Global variables
By randomization of functions I mean the manner in whch they are called , so that has to do with address.I wish to randomize the order of calls made to functions when a program is run.
Reid Spencer <reid at x10sys.com> wrote:Can you explain a little bit more about what you mean by "randomize"
functions or global variables? What aspect of them do you want to
randomize? Their
2012 Mar 27
2
What error distribution should I use?
I'm trying to make a glmm to identify the relationship between insect
species richness with fragment size, isolation and time (different years).
I already tried to analyse it using poisson distribution error, but I
always face with the following warning:
*glm.fit: fitted probabilities numerically 0 or 1 occurred *
This is probably hapenning because my dataset has a lot of zeros. So, what
2008 Aug 15
3
ylab with an exponent
plot(1,2, ylab= paste("insects", expression(m^2), sep=" "))
I get insects m^2
I would like m to the 2
what is the problem?
--
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being
2010 Oct 18
1
boxplot ranked x labels
Dear R users,
x-values (EI) = Adw, EG1, LA1, Ad1, LA2, LA3...(14 levels, insect
stages)
y-valus = antpop
within the boxplot function x-values are ordered alphabetically
Idea: x-values ranked by list order (insect stage: Egg stage 1 is
followed by Larvae 1 and not by Egg stage 2 as it would be in an
alphabetically order)
Problems with the order(tapply()) function: variable lengths
2009 Feb 11
2
problem with 'which' and strings
I have written a function that goes through a database and calculates various
metric scores and allocates them to a data set. For 400 of the 500 sites
that I calculate these metrics for works fine and allocates the scores into
the appropriate column. For some reason, some sites I run into the below
problem:
Here is what I am doing:
> names(orig.metric)
[1] "BenInsect"