I know this isn't what you are asking, but have you considered examining the
relationship between dA and the community density excluding dA?
JulieV wrote
Hi Josh,
Thanks for your response !
Actually, I already tried to plot it with a classical regression and I
know the relation is
3x4
Error: unexpected symbol in 3x4
R has no idea that you equate x as multiplication.. use an astrix
3*4
[1] 12
dominic wrote
This is basically my code:
library(MASS)
lmsreg(formula = b0 ~ b1 + b3 + b1xb2, data=mydata)
b1xb2 is an interaction but it was the centered value for
I don't know why you had c in a(1:2000))
c is a function see ?c ...
and you want a (the row number in SQL_Code) to change with each iteration
in the loop.
Perhaps this might work (I'm not saying this is the best option, just a
potential fix for what you have):
for (a in 1:2000) {
Dataset -
343GS
You should consider dropping out of college; I don't think you belong there.
McDonalds is hiring.
343GS wrote
Thanks for nothing, jerk! DENMARK IS POO
--
View this message in context:
http://r.789695.n4.nabble.com/Help-with-study-guide-for-R-exam-tp4173951p4178139.html
Sent from
Try posting this question at least 1 more time.
plocq wrote
Hi,
I try to use the function profile() of the SpatialExtremes' package to
obtain the profile likelihood of parameters for an extreme values fit
based on Poisson process :
fit-fpot(data, threshold, model=pp, npp=365).
If all else fails, open it in Excel... save as .csv
read.csv()
Nikhil Joshi wrote
I am trying to read an xlsx spreadsheet (1506 rows, 501columns) all
populated but getting the following error:
Please advise as to how to get around this issue.
res - read.xlsx(c:\\BSE_v2.xlsx,1)
Error
That really all depends on what you need; and I can't tell you what you need.
set wrote
I'm sorry, I made a mistake in my example. you're right. I don't really
know how a similarity alogrithm worksbut I'm willing to try that...are
there any good examples available?
Thank you
--
Why can't you figure this out?
I think you already know the answer: I don't speak computer.
Time to learn, or get another job I suppose. I hope you at least speak
math-statistics if you are going to attempt to understand this.
The only way you are going to be able to figure that code out
Set,
This is the same post as your Similarity Matrix post.
I'm not trying to be a smart ass here, but ... ?Can you fit a square peg in
a round hole?... yes, but it doesn't mean it belongs there.
I suggest you get a piece of paper and a pencil and figure out 1) what you
are trying to do and
As Stephen pointed out, this is easy to do. The word file the OP posted has
all the necessary formulae. Now you just need to learn how to convert those
formulae into R functions
Stephen gave you an example of how to create a function for CV. Now run
with it.
perhaps something like this is
Please use dput() to post your example data sets.
dput(Adata)
dput(Bdata)
**then copy and paste the results of each so that we can play around with
it easily.
Miriam -2 wrote
I have been trying to merge datasets, one of which has a long format
(Adata) and one has a (different) long
just use indexing.
without doing it all for you...
df - structure(list(AA = c(0.3, 0.1, 0.6), BB = c(0.9, 0.4, 0.2),
CC = c(1, 0.8, 0.6), DD = c(0.7, 0.5, 0.5)), .Names = c(AA,
BB, CC, DD), class = data.frame, row.names = c(NA, -3L
))
write.csv(df[,1], paste(colnames(df[1]), csv, sep=.))
I apologize to the list and you if I am mis-understanding something, but...
As an example:
ind2 occurs with ind1 only in cluster#3, so why does it get a value of 4 in
your similarity matrix?
Also, if this isn't a recognized similarity algorithm, perhaps you should at
the very least put quotes
Hi Michael,
How would you do this with lapply to return a list?
I can't seem to get that to work (I haven't used these much and am trying to
learn).
Thanks
Brad
Michael Weylandt wrote
? replicate
or a for loop
or do all one hundred simulations at once
x - matrix(rnorm(100^2, 1, 2),
Interesting and thank you; I'm confused as to why this doesn't work with:
lapply(rep(1,6), FUN=rnorm, n=10, mean=1.0, sd=1)
andrija djurovic wrote
Hi Brad. Maybe something like this:
lapply(rep(1,6), function(x) rnorm(10,0,1))
Andrija
On Sat, Dec 3, 2011 at 8:21 PM, B77S lt
than on a
zoo object? I am asking since I wanted to apply the provided averaging
code to a larger matrix (2500 rows x 200 cols), which is quite time
consuming...
Thanks again!
Chega
From: B77S [via R] lt;ml-node+s789695n4143909h3@.nabblegt;
To: Chega lt
use a ? to get help on a function; example:
?read.table
If you do this you will see an option called header...
use header=T if your top row contains column names.
Learn how to read these help pages. Also, read thru a few beginner R
manuals and see this website:
A simple way to determine if it is NOT is to see if the mean (the single
parameter of a poisson: lambda) and variance are the same.
This really has nothing to do with R (other than the data source), and since
it is homework, you will likely get no further help here.
Good luck.
RToss wrote
Someone is bound to know a better way, but...
subset(unlist(Version1_), subset=names(unlist(Version1_))==First)
LCOG1 wrote
Hi everyone,
I looked around the list for a while but couldn't find a solution to my
problem. I am storing some results to a simulation in a list and for
# need zoo to use rollapply()
# your data (I called df)
df - structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L),
e = c(1L, 5L), f = c(4, 7)), .Names = c(a, b, c, d,
e, f), class = data.frame, row.names = c(NA, -2L))
# transpose and make a zoo object
df2 - zoo(t(df))
#rollapply
--
View this message in context:
http://r.789695.n4.nabble.com/calculate-mean-of-multiple-rows-in-a-data-frame-tp4130468p4143875.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Sorry for that, and thanks Gabor,
I could have sworn that it wouldn't.
Gabor Grothendieck wrote
On Thu, Dec 1, 2011 at 7:13 PM, B77S lt;bps0002@gt; wrote:
# need zoo to use rollapply()
# your data (I called df)
df - structure(list(a = 1:2, b = 2:3, c = c(5L, 9L), d = c(9L, 6L),
e
--
View this message in context:
http://r.789695.n4.nabble.com/I-cannot-get-species-scores-to-plot-with-site-scores-in-MDS-when-I-use-a-distance-matrix-as-input-Pr-tp4103699p4104295.html
Sent from the R help mailing list archive at Nabble.com.
__
Try the daisy() function from the package cluster, it seems to be able to
handle NAs and non-dummy coded character variables
metaMDS(daisy(df, metric=gower))
Edwin Lebrija Trejos wrote
Hi, First I should note I am relatively new to R so I would appreciate
answers that take this into
out - vector(list)
Ylab - for(i in 1:length(BndY))
{
out[i] - paste(BndY[i], to ,BndY[i],mN)
}
Ylab - do.call(c, out)
markm0705 wrote
Dear R helpers
I'm trying to make up some labels for plot from this vector
BndY-seq(from = 18900,to= 19700, by = 50)
using
Ylab-for(i in
This is ugly, but it gets what you want.
dat[which(dat[,1] %in% unique((dat[duplicated(dat[,1], fromLast = T),
1]))),]
AC Del Re wrote
Hi,
Is there an easy way to remove dataframe rows without duplicated values of
a specified column ('id')? e.g.,
dat - data.frame(id =
as id variables
warning, but I don't really care either.
B77S wrote:
Thanks Michael,
I just started on the following code (below), and realized I should ask,
as this likely exists already.
basically what I'd like is for the function to return (basically) what you
just suggested
(matrix(colnames(x)[as.vector(i)], ncol = 2), value = x[i])
}
spec.cor(mtcars[, 2:5], .6)
Cheers,
Josh
On Wed, Nov 16, 2011 at 9:58 PM, B77S lt;bps0002@gt; wrote:
Thanks Michael,
I just started on the following code (below), and realized I should as as
this might exist.
basically
In addition to getting help from others, I always find that seeking answers
through reading to be helpful. I would suggest a basic stats book and this
paper regarding issues indices like species richness:
http://www.amazon.com/Primer-Ecological-Statistics-Nicholas-Gotelli/dp/0878932690
Here
Hello,
I would like to find out if a function already exists that returns only
pairwise correlations above/below a certain threshold (e.g, -.90, .90)
Thank you.
--
View this message in context:
hi,
If i have a list of things, like this
var.names - c(a, b, c, d, e, f)
how can i get this:
a, b, c, d, e, f
thanks ahead of time.
--
View this message in context:
http://r.789695.n4.nabble.com/split-list-of-characters-in-groups-of-2-tp4079031p4079031.html
Sent from the R help mailing
worth its own function call.
On Thu, Nov 17, 2011 at 12:42 AM, B77S lt;bps0002@gt; wrote:
Hello,
I would like to find out if a function already exists that returns only
pairwise correlations above/below a certain threshold (e.g, -.90, .90)
Thank you.
--
View this message in context
Steffen,
Did you ever have luck getting rid of the tick marks?...
I like your idea and have modified it, but yes, the tick marks need to go.
Steffen Fleischer wrote:
Dear all,
I want to draw a graph that contains the scatterplot matrix in the lower
panel and coefficients in the upper
Not sure if this helps, but did you try Google?
http://www.jstatsoft.org/v35/i09/paper
http://cran.r-project.org/web/packages/lcmm/lcmm.pdf
http://www.warwick.ac.uk/statsdept/useR-2011/abstracts/010411-liquetbenoit.pdf
yurirouge wrote:
HI,
I am relatively new to R and would appreciate
Please see ?dput
use dput(your data) and paste the output into a reply, thanks.
This way we know what you are working with.
Rich Shepard wrote:
I would appreciate pointers on what I should read to understand this
output:
summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4))
Call:
There is only one row with a complete set of observations; I think lm() is
throwing out the rest.
Rich Shepard wrote:
On Wed, 9 Nov 2011, John C Frain wrote:
As far as I know if there is an NA in any variable in an observation the
default is to drop the entire observation. Thus there are
,
156L, 140L, 128L, 160L, 215L, 230L, 316L, 163L)), .Names = c(Ca,
Cl, Cond, Mg, Na, SO4, TDS), class = data.frame, row.names =
c(NA,
-64L))
B77S wrote:
Please see ?dput
use dput(your data) and paste the output into a reply, thanks.
This way we know what you are working with.
Rich
I would start by reading one or more of the introduction manuals available
here:
http://mirrors.ibiblio.org/pub/mirrors/CRAN/
wizi wrote:
Hi everyone,
I am new to R-project. I did search through the list for my problem but i
can't find it. I am sorry if this question has been
the following is a more appropriate forum for your question, seeing as this
has nothing to do with R (per se).
http://stats.stackexchange.com/questions
good luck.
peak99 wrote:
Hello,
I have some patient data for my masters thesis with three groups (n=16, 19
20)
I have completed
If no one has a better solution, split it, take a sample of size X from both
and put it back together.
hgwelec wrote:
Dear members,
Consider the following data frame (first 4 rows shown)
age sex class
15 m low
20 f high
15 f low
10 m low
in my original
# Perhaps I misunderstand your original need, but
## I added a few lines to your data and used dput() to get the below data (I
named df)
df- structure(list(age = c(15L, 20L, 15L, 10L, 10L, 12L, 17L, 17L,
11L, 12L, 16L, 20L, 23L, 14L, 22L, 16L, 10L, 11L, 21L, 10L, 13L,
17L), sex =
Why not format the data like this:
site sampledate SO4 TDS NA Mg Cond Cl Ca
i.e. with a column for each parameter?
It seems to me that you summary doesn't make any sense. Those quantiles are
meaningless as they encompass all the parameters. Am I missing something?
Rich Shepard wrote:
Rich Shepard wrote:
On Mon, 24 Oct 2011, B77S wrote:
Why not format the data like this:
site sampledate SO4 TDS NA Mg Cond Cl Ca
Because I don't know how to reformat the base data frame (chemdata) to
achieve this.
It seems to me that you summary doesn't make any sense. Those quantiles
here is one way
df1 - data.frame(c(1:20), c(21:40), c(31:50))
list1 - c(3, 6, 20)
df2 - df1[-list1,]
hanansela wrote:
Hello
I have a list of row names that needs to be deleted from a data frame. How
do i do that?
one of the columns in the data frame contains the row names as numbers.
I know in my experience Cond (conductivity??) doesn't vary much within a
stream except for during high flow events, and I would imagine the same is
true for TDS. If these are all low flow values, you could possibly
determine a mean/median value to use for the missing data points. Obviously
this
This is just scientific notation, so
8.15e-01 is the same as:
8.15*10^-1
[1] 0.815
niki wrote:
Dear all,
i have done some regression analyses but i do not understand the p value.
These are the results
t-value p value
geno.1
Your question as answered by Timothy in your previous thread
http://r.789695.n4.nabble.com/Re-Creating-the-mean-using-algebra-matrix-td3895689.html
flokke wrote:
Dear all,
Sorry to bother you with such a stupid question, but I just cannot find
the solution to my problem.
I'd like to
The first suggestion would be to use dput() to allow people on here to access
your data.
see ?dput
I think you will want to post the output from:
dput(QInflAvgbyPlot) ## or whatever object contains your data
kelseyann wrote:
Hello, I am using the following script to run an anova for
I see what you mean.
Sorry and thanks for pointing that out to me Ben.
bbolker wrote:
B77S bps0002 at auburn.edu writes:
I have never used that function, but I know that with read.csv() you can
do
the following to select only the columns you want:
chosen_vars - read.csv(Workbook1
I have never used that function, but I know that with read.csv() you can do
the following to select only the columns you want:
chosen_vars - read.csv(Workbook1.csv, header=T)[c(variable1,
variable3)]
HTH
sassorauk wrote:
Is it possible to import only certain variables from a SPSS file.
I
It is not simply the answer, it is a list
str(integrate(dnorm, -1.96, 1.96))
List of 5
$ value : num 0.95
$ abs.error : num 1.05e-11
$ subdivisions: int 1
$ message : chr OK
$ call: language integrate(f = dnorm, lower = -1.96, upper = 1.96)
- attr(*, class)= chr
Where is dropvalue(s) mentioned?
?subset
subset: logical expression indicating elements or rows to keep:
missing values are taken as false.
select: expression, indicating columns to select from a data frame.
drop: passed on to ‘[’ indexing operator.
...: further
#This should work (again, without your data ??)
colon-read.table(c:\\alon.txt,header=T,row.names=1)
row.names(colon) -paste(g,c(1:nrow(colon)),sep=)
with(colon[1:20,], plot(norm1, norm2, type='n',xlab='x norm1 sample',ylab='y
norm2 sample',main='Norm1 vs Norm2 - 20 genes'))
with(colon,
I don't have access to your alon.txt file (see ?dput for future posts),
but...
I'm pretty sure info you want isn't in row.names(colon[1:2])
it should just be
text(x,y, label = colon[1:20])
??
HTH
baumeist wrote:
Hi,
I am new to R.
I have a matrix that I have assigned to the object
Actually, you appear to have re-assigned your object “colon” (from
c:\\alon.txt) with a character vector of intended row.names.
so use
row.names(colon) -paste(g,c(1:nrow(colon)),sep=)
B77S wrote:
I don't have access to your alon.txt file (see ?dput for future posts),
but...
I'm
Have you been shown how to save a graph as a JPEG or PNG?
try this:
png(myGraph.png)
plot(your_data)
dev.off()
A png will appear in your working directory, which can be imported into the
Word document.
You can do the same with a JPEG
see ?jpeg or ?png and ?dev.off
HTH
bonnieyuan wrote:
This isn't a question about R; more appropriate for stackexchange.
Here is one string that might interest you:
http://stats.stackexchange.com/questions/4997/can-aic-compare-across-different-types-of-model
Tania Sav wrote:
Hello,
I'm using AIC() to choose a better model. I have 3
** I am not a statistician, but...
The default arguments are:
onet.permutation(x, nsim=2000, plotit=TRUE)
you are making nsim=4 (this parameter is not the size of each sample, it
is the number of samples taken)
You are building the distribution for a statistical test through random
sampling,
I'm sure Sarah's solution works (and she knows more about R than myself), but
I ran into a similar problem and used:
as.character(start.time)==as.character(expected_start.time)
good luck regardless.
-BS
Sarah Goslee wrote:
Sounds like a case for FAQ 7.31, or, yet another machine precision
My guess is that anyone willing to help will want more information.
What version of R do you have(?), for example.
BiodiversityR Depends on R version ≥ 2.13.1, and vegan ≥ 1.17-12
SG wrote:
I have installed R on windows 7 machine.
In the install packages I can't find BiodiversityR
You'll never figure it out if you don't play around with your data.
Assuming you have been able to import the data, a good place to start is to
look at what tools you have available.Check out this:
http://cran.r-project.org/doc/contrib/Short-refcard.pdf
check out things like
?which
?max
If your data is named 'test_file'
then use dput(test_file)
You can copy and paste the results here so people can more easily try and
help you.
see
?dput
sujitha wrote:
Hi group,
I am trying to right a code to do the following
This is how the test file looks like:
Chr start end
0.00 2
4 0.00 2
5 -0.35 6
6 0.00 2
# Obviously this is not exactly what you wanted, only the last 2 columns.
Obviously, the tricky part remains... but I hope this helps.
##
B77S wrote:
If your data is named 'test_file
I have the following data (see RawData using dput below)
How do I get it in the following 3 column format (CO2 measurements are the
elements of the original data frame). I'm sure the package reshape is where
I should look, but I haven't figured out how.
Thanks ahead of time
Month Year CO2
if you'd like
Raw.melt-Raw.melt[order(Raw.melt$Year,Raw.melt$Month),]
head(Raw.melt)
Year MonthCO2
1 1958 J NA
48 1958 F NA
95 1958 M 315.71
142 1958 A 317.45
189 1958 M.1 317.50
236 1958 J.1 NA
On Wed, Sep 7, 2011 at 7:35 AM, B77S lt;bps0
package caTools
see ?trapz
. wrote:
Hi all,
is there any alternative to the function integrate?
Any comments are welcome.
Thanks in advance.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
see ?mean
Then avoid other peoples code.
cenae27 wrote:
bob-read.csv('shi.csv', header=T)
newmean-matrix(0, test, dim(bob)[2]-6);a-0; for (i in
c(4,8:(dim(bob)[2])))
{a-a+1;newmean[,a]-tapply(bob[,i], bob$Exam, mean)}
colnames(newmean)-colnames(bob)[c(4,8:(dim(bob)[2]))]
Could
If I understand you correctly, see ?paste
and the following to extract the values you require:
summary(res)[[4]][1]
summary(res)[[4]][2]
summary(res)[[8]]
HTH
ashz wrote:
Dear all,
How can I covert lm data to text in the form of y=ax+b, r2 and how do I
calculate R-squared(r2)?
I agree with Ken.. if you can, save it as a CSV file. But if you have a
bunch of these, then it isn't very efficient. I use read.xlsx() from the
package xlsx.
I notice that you are using the full path.. have you tried changing
directories?... I find it is best to compartmentalize my work and
If this is the same as geometric mean regression (aka: line of organic
correlation-- Kruskal 1953), I ended up writing my own function (although
one may exist and I didn't see it).
Bill Hyman wrote:
Dear all,
Does any one know if any R package or function can do Ordinary Least
day doesn't exist?
That would be the 1st problem.
Johannes Egner wrote:
Dear all,
how come the first loop in the below fails, but the second performs as
expected?
days - as.Date( c(2000-01-01, 2000-01-02) )
for(day in days)
{
as.POSIXct(day)
}
for( n in 1:length(days) )
## Hello.. I have asked a similar question, but this is not fixed as before.
## I am running the following using Ubuntu OS:
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)
## when I do this:
Have you looked at the manual for any of these?
?get
?sprintf
?assign
#and so on...
?
Bazman76 wrote:
m0-epxression((4*theta1*theta2-theta3^2)/(2*x*theta3^2)-0.5*theta1*x)
params-all.vars(m0) this reads all the
params from m0 so theta1,2 and 3 correct?
Hi,
How can I discern which elements in x (see below) are in 'order', but more
specifically.. only the 1st 'ordered run'?
I would like for it to return elements 1:8... there may be ordered values
after 1:8, but those are not of interest.
x - c(1, 2, 3, 4, 5, 6, 7, 8, 20, 21, 22, 45)
Thanks
well.. the following works, but if you have another idea I am still
interested.
1:(which(diff(x)!=1)[1])
B77S wrote:
Hi,
How can I discern which elements in x (see below) are in 'order', but more
specifically.. only the 1st 'ordered run'?
I would like for it to return elements 1
, B77S lt;bps0...@auburn.edugt; wrote:
Hi,
How can I discern which elements in x (see below) are in 'order', but
more
specifically.. only the 1st 'ordered run'?
I would like for it to return elements 1:8... there may be ordered values
after 1:8, but those are not of interest.
x - c(1, 2, 3, 4
1st of all Dr Utz, thanks for your recent pubs on regional differences
between the piedmont and coastal plain streams.
and to add to Daniels post (giving your binary yes/no):
df-merge(x,y,all.x=T,all.y=F)
df[exceed] - ifelse(df$Qdf$Threshold_Q , 1, 0)
## now look at df
df
Daniel Malter
?paste
something like...
paste (group, i, sep=_)
jiliguala wrote:
Hello R users,
I am new to R and am having difficulty with the output name of my for
loops.
here is the problem:
for (i in c(1:100))
{
the name of the groups - which(k1$cluster==i)
}
how can it
?paste
something like...
paste (group, i, sep=_)
jiliguala wrote:
Hello R users,
I am new to R and am having difficulty with the output name of my for
loops.
here is the problem:
for (i in c(1:100))
{
the name of the groups - which(k1$cluster==i)
}
how can it
#Hi all,
#Using the example data that follows, can someone please show me how to get
a scatterplot of points with #error bars in the Y direction. something like
this works for one Y:
xYplot(Cbind(y1, l1, u1) ~x1, data=y)
#but this:
xYplot(Cbind(y1, l1, u1) + Cbind(y2, l2, u2)~x1, data=y)
#
If you don't want your history, why not just do this.
q()
Save workspace image? [y/n/c]:
n
??
Am I missing something?
1Rnwb wrote:
Thanks, I thought that removing the list would take care of it. the
question is I do not see a .Rhistory file in my current working directory,
so where it
This probably is not ideal, but this works on a list of mine..
## so you can see the structure of my list
str(srMT)
List of 4
$ mode : chr discrete
$ ks.stat : chr mean
$ observed :List of 4
..$ filter: num [1:13, 1:4] 0.213 0.207 0.144 0.311 0.24 ...
.. ..- attr(*,
I'm thinking this isn't what you want.. but also:
data.frame((srMT[[3]][1]))[b,][2]
filter.vel2
MK_SP10.2503257
SB1_SP1 0.2075117
SB4_SP1 0.2358855
B77S wrote:
This probably is not ideal, but this works on a list of mine..
## so you can see the structure of my list
#replace v with whatever
rm(list=(ls()[ls()!=v]))
--
View this message in context:
http://r.789695.n4.nabble.com/Removing-objects-and-clearing-memory-tp3445763p3445865.html
Sent from the R help mailing list archive at Nabble.com.
__
step # 1
?read.csv
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-create-a-3d-Surface-plot-from-a-CSV-file-tp3437463p3437478.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
assuming this is from a list
mydata[[1]][1]
and
mydata[[1]][7]
??
Wonjae Lee wrote:
Hi,
I have a stupid and simple question.
Please forgive me.
In an example below, please tell me how to call 1947 in mydata.
Thank you in advance.
Wonjae
mydata
[[1]]
[1] 1947
ifelse(length(unique(x))==1, All Equal, Not All Equal)
--
View this message in context:
http://r.789695.n4.nabble.com/problem-with-all-all-equal-tp3431956p3432167.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
FYI:
The problem I had was that my modified .Rprofile text file was being read
and had lines to load the libraries of packages that were not installed yet
on this Ubuntu machine; I guess I copied the .Rprofile from my laptop.
If you have similar problems, simply do this in command line:
mv
That is odd, I noticed some weird sorting with merge() a while back too and
always am careful with it now. Fortunately, sort=FALSE seems to work the
way one would think most of the time.
Although, the following results seem weird too! (adding by=date makes it
not sort oddly, regardless of
All:
I have been looking through the string of posts regarding this same issue,
but I haven't been able to fix this problem.
I am running Ubuntu 10.4 64bit, R version 2.10.1
I cannot install certain packages (e.g. vegetarian) and each time it says
basically the same thing (regardless of the
also, I have 'r-base-dev' installed as well
--
View this message in context:
http://r.789695.n4.nabble.com/R-Ubuntu-package-installation-with-non-zero-exit-status-tp3305989p3306005.html
Sent from the R help mailing list archive at Nabble.com.
__
## i didn't try this, but I would think it would work
newAB -data.frame(AB$id, AB$age, AB$sex, AB$area)
colnames(newAB)-c(id,age, sex, area)
uni.newAB - unique(newAB)
t3-merge(t2, uni.newAB, by=id, all=FALSE)
--
View this message in context:
It is a lot prettier than mine too.
Thanks Jari.
rrarefy
function (x, sample)
{
if (length(sample) 1 length(sample) != nrow(x))
stop(length of 'sample' and number of rows of 'x' do not match)
sample - rep(sample, length = nrow(x))
colnames(x) - colnames(x, do.NULL =
Also, I really appreciate you explaining why you used factor. I'm still not
quite sure what set.seed does (i read ?set.seed) or why you chose 123... but
it and the function below work, so that is all that matters. :)
randSub - function(L1, s.size)
{
set.seed(123)
samptbl - apply(L1, 1,
So, after thinking about this a bit, I realized that the previous solution
wasn't exactly what I needed. I really needed replacement=F and to be able
to choose any sample size (n.sample) less than or equal to the site (row)
with the lowest total abundance.
Anyway, I think this works.
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,
0
If you know, I'd appreciate it.. thanks again for the help.
David Winsemius wrote:
On Feb 6, 2011, at 3:25 PM, B77S wrote:
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
hehe...
very true sir; I apologize, that was very straightforward. Thank you for
your time.
--
View this message in context:
http://r.789695.n4.nabble.com/Subsampling-out-of-site-abundance-matrix-tp3263148p3263598.html
Sent from the R help mailing list archive at Nabble.com.
98 matches
Mail list logo