Hi:
One way:
x[sample(nrow(x)), ]
HTH,
Dennis
On Wed, Feb 9, 2011 at 10:45 PM, Diogo Almeida dala...@gmail.com wrote:
Hi,
I need to permute the rows of a matrix, where each row is independently
rearranged. A simple solution is this:
shuffled - datamatrix - matrix(1:24, ncol = 4)
for (i
On Thu, Feb 10, 2011 at 01:45:46AM -0500, Diogo Almeida wrote:
Hi,
I need to permute the rows of a matrix, where each row is independently
rearranged. A simple solution is this:
shuffled - datamatrix - matrix(1:24, ncol = 4)
for (i in 1:nrow(datamatrix)) { shuffled[i, ] -
Unless I've made a mistake (it happens!) that gives FALSE on the data which
the OP said should give TRUE.
Ravi Varadhan suggested
duplicated(a) duplicated(b)
but that gives the same result for
b - c(n, m, o, m)
for which I think the OP would like FALSE
I think this may do it
all((a %in%
On Thu, Feb 10, 2011 at 01:45:46AM -0500, Diogo Almeida wrote:
Hi,
I need to permute the rows of a matrix, where each row is independently
rearranged. A simple solution is this:
shuffled - datamatrix - matrix(1:24, ncol = 4)
for (i in 1:nrow(datamatrix)) { shuffled[i, ] -
Hi there,
I'm new working with R and I am trying to find the unchosen set of islands
that are closer to all the possible combination (of 2 out of 13) of a set of
chosen islands.
In other words, if I have a set of 13 islands (1, 2, ...13) and choose all
the possible combination of 2 islands (1-2,
Hello Dan,
I just need to make substractions, comparisons and to use them in a split
command.
Ptit Bleu.
Hello,
I have a text file with one column containing long number but stored as
string.
I download the file with read.table (and colClass) and the first row of
this
column is :
Hi,
I have a graph G with n nodes (n=1..100).
I want to find the spanning tree over only some specific nodes (not all
nodes in G), for instance nodes (2,3,6).
Is there any way in R that can do this?
Maybe one solution is create another subgraph g' of graph G which
consists nodes 2,3,6 and their
Hi all,
I a semi-beginner with R and I am working with the plm package to examine a
longitudinal dataset. Each individual in this dataset has a longitudinal
weight for the probability that he or she remains in the sample.
Unfortunately, I have not found an argument to use weights in the plm
Hi R users,
Thanks in advance.
Is it possible to install R on cygwin? If yes, can anyone assist me how can I
install R on cygwin?
Currently, I am using R on Windows XP. I have found that binary version of some
packages such as RCurl is not available.
Once again, thank you very much for
The following is what I have done:
1)##made an data frame:
X=c(1,1,1,1,
1,1,1,2,
1,1,2,1,
1,1,2,2,
1,2,1,1,
1,2,1,2,
1,2,2,1,
1,2,2,2,
2,1,1,1,
2,1,1,2,
2,1,2,1,
2,1,2,2,
2,2,1,1,
2,2,1,2,
2,2,2,1,
2,2,2,2)
X=matrix(X,4,16)
X=t(X)
freq=c(20,2,6,1,9,2,4,1,38,7,25,6,24,6,23,42)
Hi,
I've noticed that font antialiasing is enabled in the console window,
but not in the editor windows. I'm using R version 2.12.1. JGR 1.7.4 and
the jdk from Ubuntu 10.04, which claims to be: OpenJDK Runtime
Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1~10.04.1). Is that a
problem with my
On Thu, 10 Feb 2011, Deb Midya wrote:
Hi R users, ? Thanks?in advance. ? Is it possible to install R on
cygwin? If yes, can anyone assist me how can I install R on cygwin?
That *is* described in the 'R Installation and Administration' manual.
? Currently, I am using R on Windows XP. I have
I'm not sure I did anything special to install R for use with cygwin.
Availability of RCurl appears to relate to windohs AFAICT from the CRAN page.
I have never bothered to use this since I already use the related linux
tools available through cygwin. Building from source may have become an
Dear Arne,
the inclusion of weights in the (mainly-GLS-related-) procedures in
'plm' is not obvious: at least, it is not to me. Maybe you might apply
the weights to the data before using them in estimation, which I have
done in the past, although it was then meant to reflect stratification,
not
On Wed, Feb 18, 2009 at 9:21 PM, dobomode dobom...@gmail.com wrote:
I am trying to import a large dataset from SPSS into R. The SPSS file
is in .SAV format and is about 1GB in size. I use read.spss to import
the file and get an error saying that I have run out of memory. I am
on a MAC OS X
Dear R gurus,
If I got a vector with string characters like abcd_efgh_12ab3_dfsfd,
how could I extract 12ab3, which is the characters after second
underscore and before the third underscore?
Tons of thanks
yan
Try this:
gsub(.*_.*_(.*)_.*, \\1, abcd_efgh_12ab3_dfsfd)
On Thu, Feb 10, 2011 at 9:42 AM, Yan Jiao y.j...@ucl.ac.uk wrote:
Dear R gurus,
If I got a vector with string characters like abcd_efgh_12ab3_dfsfd,
how could I extract 12ab3, which is the characters after second
underscore and
The answer to that question is at the bottom of each and every message
that appears on this list:
https://stat.ethz.ch/mailman/listinfo/r-help
On Wed, Feb 9, 2011 at 11:53 PM, Julie Smith smit...@plu.edu wrote:
Hi,
How can I unsubscribe from the mailing list?
Best,
Julie mith
Hi,
I have installed the latest version of libglib-2.0 (2.28.0) and cairo 1.10.2
Then I have compiled R 2.12.1
But when i I try to install Cairo (1.4-6) I get the following
unreferenced Symbol error:
*** installing help indices
** building package indices ...
** testing if installed package
On 11-02-09 7:40 PM, David Wolfskill wrote:
[New to the community; still in early part of R's learning curve.]
In the call below that has
plot(..., par(new=TRUE))
you don't name the parameter to which par(new=TRUE) will be bound, so
the first available is chosen, which was apparently xlim.
First, it is 'Cairo' (R is case sensitive), and this is wrong list
(see the posting guide).
But in any case we can't help you as what you show is far from
complete and this is not an R issue. Usually there are multiple
versions of such libraries on a Solaris system: the problem is most
If you read my email carefully then: if I wrote Cairo I mean the R
Package Cairo else I mean the Library cairo from carographics.org!
I need to use Cairo because we are creating a huge amount of graphics
in BATCH mode for reporting purpose. I think pango is not the solution I
need for
Den wrote:
'Aggregate multiple functions into a single function. Combine multiple
functions to a single function returning a named vector of outputs'
This is a short description of each() function from plyr package
Here is an example from help
each(min, max)(1:10)
Thanks! I really
Hi
I am trying to model path of a wind powered boat.
I have some wind data, model as the frequency of the wind with its strength and
direction.
What I like to be able to calculate is for some random period in time for
points
a b c what was the wind strength and what was its direction.
He everybody,
I want to add 1 to some elements of a vector:
x is a vector
u is a vector of idices, that is, integers
assumed to be within the range 1..length(x)
and I want to add 1 to the elements of x
each time their index appears in u
x[u]-x[u]+1 works only when there are no
duplicated
Hello,
I am interested in classifying some data using a maximum likelihood classifer.
Does anybody know a package which include this classifier?
Thanks
[[alternative HTML version deleted]]
__
Hello,
I have a ggplot that has the looks of the plot that I want, but it doesn't
have the right layout.
The data is an ordered melted dataframe:
- ID
- type (to use for a faced grid)
- time - type
- time - value (POSIXct)
- pos (to use for a faced grid, this is an index to split the plot)
David and Bill,
Thank you so much for your rapid and exceptional help. Bill, the reason I had
gone with lists within the list was because I thought I might use the list for
holding other information - and because it was easier to get the column name.
Your simple-list suggestion is cleaner and
Hello,
It's not easy to express clearly what I have in mind by stochastic growth
models. I've
been working with a couple of titles -Stochastic Models in
Biology, for one, but both date back a decade or more.
I'll try to illustrate the model a little more.
A reasonably comparable situation is
Dear all,
Is there a package that allows me to run a sensitivy analysis on a
matched dataset created using MatchIt? I am aware of both rbounds and
the sensitivy function in the twang package but they do not allow
matched objects from MatchIt as input.
//M
should be able to:
u - unique(u)
x[u] - x[u] + 1
On Thu, Feb 10, 2011 at 6:50 AM, Eric Elguero eric.elgu...@ird.fr wrote:
He everybody,
I want to add 1 to some elements of a vector:
x is a vector
u is a vector of idices, that is, integers
assumed to be within the range 1..length(x)
and
On Feb 10, 2011, at 12:23 AM, Matthew Schmidt wrote:
Refresh list was used, but a restart of the client was necessary for
updates to become active.
I was under the impression which I have just corrected that it would
be a simple matter to detach() a package and reload it. My efforts to
Hi,
Is there any function in R to find the Directed Minimum Spanning tree?
There are some for undirected but I am looking for a directed tree.
Regards,
Amir
--
___
Amir Darehshoorzadeh |Comp. Architecture Dept.
PhD Student
The single assignement works excellent for my R_2.12.1 and Tinn-R_2.3.7.1 in
Windows 7 x64 on a limited user account (changes to profile.site has to be
done with adm priv though).
Thanks!
--
View this message in context:
Hello there,
I don't know if I'm addressing my question to the right e-mail address, I hope
I do. Actually I have a little problem concerning writing a code in R. I try to
briefly sum up my problem.
As you can see below, I created the functions Equation1 and Equation2 with
some conditions.
Hello there,
I don't know if I'm addressing my question to the right e-mail address, I hope
I do. Actually I have a little problem concerning writing a code in R. I try to
briefly sum up my problem.
As you can see below, I created the functions Equation1 and Equation2 with
some conditions.
On Thu, Feb 10, 2011 at 12:50:03PM +0100, Eric Elguero wrote:
He everybody,
I want to add 1 to some elements of a vector:
x is a vector
u is a vector of idices, that is, integers
assumed to be within the range 1..length(x)
and I want to add 1 to the elements of x
each time their index
Hi again!
I just wanted to say that during typing my message before I mistyped certain of
characters and I was just afraid that it might spoil the understanding of my
message. So I corrected the characters and now I'm sending you this corrected
letter again.
Terribly sorry for my mistake.
Dear R-List,
I have a dataframe
area-c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10))
type-c(rep(1:10,5))
a-rnorm(50)
b-rnorm(50)
c-rnorm(50)
d-rnorm(50)
df-cbind(area,type,a,b,c,d)
df
area type a b
c d
[1,]11 0.45608192
The issue here is that if only accepts a single True/False argument. Try
these functions:
?ifelse
?all
?any
--
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
Is the room still a room when its
Thanks all for your help. I fear text mining is an abstract little corner of
R.
I have imported 3228 text (.txt) files, each a news story, into R using
[tm]:
textd - Corpus(DirSource(other/docs), readerControl = list(reader
=readPlain))
I can pre-process each individual document using
R experts,
I need to sample two rows without replacement from the following data frame
such that
neither row contains the same 'DOW'. For example, I cannot select both a Monday
morning
and a Monday afternoon. I am using STRATA_NUM as an index to randomly select
rows from,
since this
I want to create a randomly generated 25*15 binary matrix knowing what the
colSums and rowSums of this matrix should be.
colSums(a)
[1] 3 7 2 5 0 4 6 5 5 4 3 4 4 5...
rowSums(a)
[1] 8 6 6 6 6 6 5 5 5 5 4 4 4...
. .
Baptiste Coulmont
On 10/02/2011 11:02 AM, Hosack, Michael wrote:
R experts,
I need to sample two rows without replacement from the following data frame
such that
neither row contains the same 'DOW'. For example, I cannot select both a Monday
morning
and a Monday afternoon. I am using STRATA_NUM as an index to
Try using tabulate() instead of table(). E.g.,
compare your original
f0 - function (x, u) {
tu - table(u)
indices - as.numeric(names(tu))
x[indices] - x[indices] + tu
x
}
to
f1 - function (x, u) {
x + tabulate(u, nbins = length(x))
}
I tried it for a 20-long
On Thu, Feb 10, 2011 at 10:49 AM, Nikhil Joshi nikhiljo...@gmail.com wrote:
Gabor,
thanks for the suggestion.
I did as you have suggested- Started a clean session of R and set the java
option. Then I sourced the library and tried to read the xlsx file but got
the same error. I am assuming
Baptiste Coulmont coulmont at yahoo.com writes:
I want to create a randomly generated 25*15 binary matrix knowing what the
colSums and rowSums of this matrix should be.
colSums(a)
[1] 3 7 2 5 0 4 6 5 5 4 3 4 4 5...
rowSums(a)
[1] 8 6 6 6 6 6 5 5 5 5 4 4 4...
This is a fairly
Dear List Members
Upfront: I am not sure if this is the right place to ask this question even
after reading through the FAQ, so apologies if I should have directed the
question elsewhere.
My problem as follows: I need a modified version of some existing R package.
I am well able to make the
Dear All,
I am not that much into machine learning, but I know that R is wonderful
at that. My problem is the following: consider a set of N individuals
and an N by N symmetric matrix M.
This matrix stands for an interaction between individuals, i.e. the
element M[i,j]=M[j,i] is the
I can't see a good solution using a loop, but perhaps this
will get you what you want:
Dframe1$date = as.Date(Dframe1$sunrise)
Dframe2$date = as.Date(Dframe2$Logtime)
both = merge(Dframe1,Dframe2)
both$when = ifelse(both$Logtime = both$sunrise
+both$Logtime =
Is there an easy way to make the error bars the same color as the points and
lines they are plotted with.
My example
# fake data
x=sample(1:10, 100, replace =T)
y = rnorm(100) + runif(100)
df=data.frame(x,y)
# summarize data
m = aggregate(df,list(x),mean)
se = aggregate(df,list(x),sd)/sqrt(10)
Hi, I initially posted this to the general R mailing list, but Bert Gunter
thought this may be a mixed model issue, so suggested me to post here.
I have a dataset that has 2 groups of subjects. For each subject in each group,
the response measured is the number of success (no.success) obatined
Thanks for the response, Rex. This is an interesting approach. The
Choleski decomposition approach that John suggested seems to be an
obvious and direct approach to this problem. Your approach is less
obvious to me but may be equal or superior to the Choleski
decomposition.
Are all possible
Hi Henrique,
I believe your solution is wrong as it is fitted to find 12ab3,
whereas Yan seems to be asking for the characters after the second
underscore and before the third underscore.
For example, gsub(.*_.*_(.*)_.*, \\1,
abcd_efgh_X_12ab3_dfsfd) would still yield 12ab3 even though, as
I
What you can do to find out is to type into your R session
RSiteSearch(multivariate fractional gaussian)
That seems to give some usefull results.
Kjetil
On Tue, Feb 8, 2011 at 1:51 PM, Wonsang You y...@ifn-magdeburg.de wrote:
Dear R Helpers,
I have searched for any R package or code for
Alain -
Here's a reproducible data set:
set.seed(19)
area-c(rep(1,10),rep(2,10),rep(3,10),rep(4,10),rep(5,10))
type-c(rep(1:10,5))
a-rnorm(50)
b-rnorm(50)
c-rnorm(50)
d-rnorm(50)
df-cbind(area,type,a,b,c,d)
First I'll make a helper function to operate on one
row of the data frame:
get2
Hello!
I am using rhierMnlRwMixture from bayesm package. I would like to use
it with a categorical covariate (Z).
I have 2 clariciation questions:
1. If the covariate is categorical, do I have to represent it as dummy
variable(s)? (e.g., 2 dummy variables for a 3-level categorical
variable)?
2.
prop.test() is applicable to a binomial experiment in each of two classes.
Your experiment is binomial only at the subject level. You then have
multiple subjects in each of your groups.
You have a random factor Subjects that must be accounted for.
The best way to analyze is a generalized
Simon Knos simon_mailing at quantentunnel.de writes:
Upfront: I am not sure if this is the right place to ask this question even
after reading through the FAQ, so apologies if I should have directed the
question elsewhere.
I appreciate your confusion. I think this might be slightly more
HI,
I am interested in calculating hazard ratio of the stratified groups defined
by me.
library(survcomp)
binscores -
cut(scores.train,c(-1000,-1,1,1000),c(low,intermediate,high))
dd - data.frame(surv.time=OS, surv.event= status, strat=binscores)
km.coxph.plot(formula.s=Surv(surv.time,
The SAS import/export feature of Revolution R Enterprise 4.2 isn't
open-source, so we can't release it in open-source Revolution R
Community, or to CRAN as we do with the ParallelR packages (foreach,
doMC, etc.).
It is, though, available for download free of charge to members of the
academic
So, a way could be:
gsub((.*)_(.*)_(.*)_.*, \\3, abcd_efgh_X_12ab3_dfsfd)
On Thu, Feb 10, 2011 at 3:47 PM, Soumendra soumen...@gmail.com wrote:
Hi Henrique,
I believe your solution is wrong as it is fitted to find 12ab3,
whereas Yan seems to be asking for the characters after the
Hi,
I don't know how to make prediction with a factor in the linear model.
Say
yd=c(1,2,3,4,5)
sl=c(2,3,4,5,6)
sex=c(male,male,female,female,male)
sex=factor(sex)
m=lm(sl~yd+sex+sex:yd)
How to make a prediction with new data like yd=c(4,5,6,7,8) for male and
female separately ?
Gabor,
thanks for the suggestion.
I did as you have suggested- Started a clean session of R and set the java
option. Then I sourced the library and tried to read the xlsx file but got
the same error. I am assuming that Java machine is loaded when the package
xlsx is sourced and not when the
I am using bagging to perform Bagged Regression Trees on count data (bird
abundance in Britain and Ireland, in relation to climate and land cover
variables). Predictions from the final model are visually believable but I
would really like a diagnostic equivalent to classification success that
Hi Dennis,
Thanks for the solution, I really appreciate it!
Best,
Nathaniel
--
View this message in context:
http://r.789695.n4.nabble.com/Need-help-merging-two-dataframes-tp3297313p3299539.html
Sent from the R help mailing list archive at Nabble.com.
Hi, all
I'm trying to solve an optimization problem with two variables, in wich I use
the following functions(they all are working perfectly):
FxMixedALT=function(x){calc=(-0.88*exp((-1.53655/1000)*(x^5.3)))-(0.12*exp(-0.06415*(x^2.5)))+0.88+0.12return(calc)}
If you want a random correlation matrix, why not just generate random data and
accept the correlation matrix that you get? The standard normal distribution
in k dimensions is (hyper)spherically symmetric. If you generate k standard
normal N(0,1) variates, you have a point in k-space with
I have fitted the faults.data to glm.nb and to the function negbin from the
package aod. The output of both is the following:
summary(glm.nb(n~ll, data=faults))
Call:
glm.nb(formula = n ~ ll, data = faults, init.theta = 8.667407437,
link = log)
Deviance Residuals:
Min 1Q
Dear All,
Could someone please suggest me the way to calculate the optimal threshold in
POT method via any available packages in R?
Thanks,
Fir
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Thank you guys, I've solved my problem with your precious help
--
View this message in context:
http://r.789695.n4.nabble.com/Use-glm-coefficients-for-other-datasets-tp3276626p3299747.html
Sent from the R help mailing list archive at Nabble.com.
__
On 2011-02-09 17:27, Robert Baer wrote:
Is there an easy way to make the error bars the same color as the points and
lines they are plotted with.
My example
# fake data
x=sample(1:10, 100, replace =T)
y = rnorm(100) + runif(100)
df=data.frame(x,y)
# summarize data
m =
On Feb 9, 2011, at 8:27 PM, Robert Baer wrote:
Is there an easy way to make the error bars the same color as the
points and lines they are plotted with.
My example
# fake data
x=sample(1:10, 100, replace =T)
y = rnorm(100) + runif(100)
df=data.frame(x,y)
# summarize data
m =
On Feb 10, 2011, at 12:13 PM, Ben Bolker wrote:
Simon Knos simon_mailing at quantentunnel.de writes:
Upfront: I am not sure if this is the right place to ask this question even
after reading through the FAQ, so apologies if I should have directed the
question elsewhere.
I appreciate
On 02/10/2011 05:30 PM, Gabor Grothendieck wrote:
On Thu, Feb 10, 2011 at 10:49 AM, Nikhil Joshinikhiljo...@gmail.com wrote:
Gabor,
thanks for the suggestion.
I did as you have suggested- Started a clean session of R and set the java
option. Then I sourced the library and tried to read the
On Thu, 2011-02-10 at 10:44 -0800, David Smith wrote:
The SAS import/export feature of Revolution R Enterprise 4.2 isn't
open-source, so we can't release it in open-source Revolution R
Community, or to CRAN as we do with the ParallelR packages (foreach,
doMC, etc.).
Judging by the language of
High,
on all of my computers the first entry in libPaths for root
was /usr/lib64/R/library or /usr/lib/R/library. Now it change at one
(lynx) anyway to
root@lynx:/root(2)# R
R version 2.12.1 (2010-12-16)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform:
On 10 February 2011 12:01, Matt Shotwell m...@biostatmatt.com wrote:
On Thu, 2011-02-10 at 10:44 -0800, David Smith wrote:
The SAS import/export feature of Revolution R Enterprise 4.2 isn't
open-source, so we can't release it in open-source Revolution R
Community, or to CRAN as we do with the
Hello!
Very sorry for a probably very simple question - I looked but did not
find an answer in the archives.
I have a table counts (below) that shows counts by Option within
each of my 2 groups. However, my groups have different sizes (N1=255
and N2=68). Table prop shows the resulting proportions
Hi all,
I have a dataset. Each time I want to sample N(i) elements from
it and I want to repeated sampling M times. N(i) is varied from time to time.
For example,
dataset = 1:50;
a = list();
M = 1000;
I want to
I have a data frame with the following columns:
Date Price Buy Sell
The Buy and Sell variables are binary. They are either zero or 1.
Additionally, they are mutually exclusive. Either Buy is 1, Sell is 1 or
they are both 0. But they are never both 1 for a given observation.
I want to see
Dear All -
I would like to make multi-page plots, but my plots are writing over one
another - thus leaving just the last plot. Here is what I am doing:
pollutionRose(temp, nox, type=hour)
update(trellis.last.object(), layout =c(3,3,3) )
I would like 24 plots with 9 plots/page (the last page
Hi, I am a new R user and am trying to construct a palaeoenvironmental
transfer function (weighted averaging method) using the package rioja.
I've managed to insert the two matrices (the species abundance and the
environmental data) and have assigned them to the y and x values
respectively. When
Try
my.data.frame[my.data.frame$Buy==1 | my.data.frame$Sell ==1, ]
or
subset(my.data.frame,buy == 1 | sell == 1)
Then take a look at the help page for || i.e., help(||)
to see what you did wrong.
- Phil Spector
Do anyone know an R or bioconductor package to draw HGDP pie chart as in the
link below?
http://hgdp.uchicago.edu/cgi-bin/alfreqs.cgi?pos=118253964chr=chr8rs=rs12255372imp=false
Many SNPs were missing from the link, so I would like to draw similar graphs in
R. I have all the allele frequency
Hello,
I plot box plot, and add a point to the box indicating mean. I also add some
range to the box width. I want to add legend for both the range (line) and
mean (point). However, I cannot add line legend and point legend together.
The code looks like the following.
(1) First, I tried the
1. If you use a random effects model, you should make Subject the
random factor. I.e., a random intercepts model with 1|Subject. Group
is a fixed effect: You have only 2 groups. Even if you had more than
2 groups, treating Group as random would return a standard deviation,
not a P-value as you
Hi,
try
ds-1:50
M-10
n-sample(5:15,M,replace=T) #generate different n[i]
lapply(1:M,FUN=function(i) sample(ds,n[i]))
hth.
Am 10.02.2011 19:50, schrieb Hui Du:
Hi all,
I have a dataset. Each time I want to sample N(i) elements
from it and I want to repeated sampling M
Hello!
I have a dataset like this:
X1 X2 X3 X4 X5X6X7X8
1 2 2 1 2 3 2 6
2 3 2 5 7 9 1 3
19 12 6 1 1 3 6
The columns X1-X6 contains ordinary numeric values.
X7 contains the
You could use the floating.pie function in the plotrix package, but even the
author of that function/package has stated in the past that pie charts are not
the best tool. Also look at the symbols function for some alternatives, I
would use the thermometers (and if that does not give enough
Hello,
I am trying to make a xyplot plot with points that are different symbols. I
want to call the symbol type (pch) from a column in my dataframe. Here is a
simplified example. In my real example I also have groups, which I have not
included here. This example doesn't change the symbols
Given a dataset x, the ecdf is ecdf(x). Then I can use ecdf(x)(y) to find
the percentile of y. Given the ecdf is there a way to determine what is the
value of y that is the boundary of let's say 95 percentile? In other words,
is there a function I can call on the ecdf like:
fomeFunc( ecdf( x ),
Hello there, would you please look into my codes? Here I have following:
set.seed(100)
samp - sample(c(1,-1,0), 20, replace=T); samp
[1] 1 1 -1 1 -1 -1 0 -1 -1 1 -1 0 1 -1 0 0 1 -1 -1 0
Here I want to calculate the length of each unique number for above vector.
How can I do that?
Marine -
Assuming your data frame is named df, I think
apply(df,1,function(x)mean(x[x[7]:x[8]]))
will give you what you're looking for.
- Phil Spector
Statistical Computing Facility
See ?.libPaths : as so often, all that is needed is attentive reading
of the documentation:
The library search path is initialized at startup from the
environment variable ‘R_LIBS’ (which should be a colon-separated
list of directories at which R library trees are rooted)
Robert, thank you!
I tried all 3 models you suggested. Since each subject only has one line of
data
in my dataset, would including Subject as a factor in glm() or lm() lead to 0
df
for resaiduals?
Attached is my dataset and here is my version of the 3 models:
Hi,
does
table(samp)
do what you want?
Am 10.02.2011 22:54, schrieb Nipesh Bajaj:
Hello there, would you please look into my codes? Here I have following:
set.seed(100)
samp - sample(c(1,-1,0), 20, replace=T); samp
[1] 1 1 -1 1 -1 -1 0 -1 -1 1 -1 0 1 -1 0 0 1 -1 -1 0
Here
On 11-02-10 3:56 PM, Shiguo Jiang wrote:
Hello,
I plot box plot, and add a point to the box indicating mean. I also add some
range to the box width. I want to add legend for both the range (line) and
mean (point). However, I cannot add line legend and point legend together.
The code looks like
Hi:
There are a couple of things here. Firstly, if you intend to predict from a
model in R, make sure your input to the model is a data frame. You can fit a
model piecemeal with a set of vectors, but there's a distinct possibility
you'll end up frustrated when trying to make predictions with new
?rle
--
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
Department of Ecology VOICE: (360) 407-6815
PO Box 47600FAX:(360) 407-7534
Olympia, WA 98504-7600
1 - 100 of 140 matches
Mail list logo