Hi Markus,
You can't assume that a typical R users knows much about S+.
"R has been beyond S+ for a long time"
{{ :-) :-) please Insightful staff, don't start to jump at me !}}
Even I, as a very long time S and Splus user (of the past:
1987--~1997), have never, I think, used align().
Can yo
I use something like Gavin's solution for functions which are not used too
often. The problem with using 'source' is that the user environment gets
cluttered.
I 'save' the most useful functions to a single file ("MMmisc.Rda"), put it
in the HOMEPATH directory (use Sys.getenv("HOMEPATH") to find w
David Duffy wrote:
>> Waverley <[EMAIL PROTECTED]> asked:
>>
>> Dear Colleagues,
>>
>> I am looking for a package or previous implemented R to subgroup and
>> exaustively divide a vector of squence into 2 groups.
>>
>> --
>> Waverley @ Palo Alto
>>
>
> Google "[R] Generating all possible part
Dear R-users,
I'm using Ubuntu dapper, which only have R of Version 2.2.1.
Would anybody tell me how to install the latest version of R with
Synaptic in Ubuntu dapper system.
Thanks!
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mail
The new package "benchden" 1.0.0 implements 28 benchmark densities for
nonparametric density estimation that were introduced by A. Berlinet and
L. Devroye ("A Comparison of Kernel Density Estimates", Pub. Inst. Stat.
Univ. Paris, XXXVIII, fasc. 3, 1994, 3-59,
http://cg.scs.carleton.ca/~luc/devs.htm
Dear R users,
I would like to extract df and Mean Sq values. I tried several things (e.g.,
str(model1), names(model1)) but I can't find a way to extract these values.
I also tried to search using
RSiteSearch. Any help will be appreciated. Thanks Taka,
model1<-aov(dv~iv.1*iv.2*iv.3)
summary(m
Hi
I have two tree and i want compute error of each tree and then
cmparison with t.test.
I cant coding this problem.Could i help me?
Regards
-
[[alternative HTML version deleted]]
__
R-h
You need to specify a whole column. try qqnorm(table[,1])
On Thu, 2007-06-28 at 18:50 -0700, Jiong Zhang, PhD wrote:
> I want to qqnorm every column in a table. When I try the first column
> using
>
> qqnorm(table$column1), it worked.
>
> But when I use
>
> qqnorm(table[1]), it tells me "Error
qqnorm(table[,1])
is what you want, isn't it?
and other forms would include:
par(ask=TRUE)
results = apply(table, 2, qqnorm)
par(ask=FALSE)
b
On Jun 28, 2007, at 9:50 PM, Jiong Zhang, PhD wrote:
> I want to qqnorm every column in a table. When I try the first column
> using
>
> qqnorm(table$
I want to qqnorm every column in a table. When I try the first column
using
qqnorm(table$column1), it worked.
But when I use
qqnorm(table[1]), it tells me "Error in stripchart(x1, ...) : invalid
plotting method".
What happen? How can I make a function that qqnorms every column?
thanks a lot.
Hi All,
Now it works. Thanks for all your answers and the explanations are
very clear.
Bingshan
On Jun 28, 2007, at 7:44 PM, Seyed Reza Jafarzadeh wrote:
> NewVar <- relevel( factor(OldVar), ref = "b")
> should create a dummy variable, and change the reference category
> for the model.
>
>
NewVar <- relevel( factor(OldVar), ref = "b")
should create a dummy variable, and change the reference category for the model.
Reza
On 6/28/07, Bingshan Li <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have a variable with several categories and I want to convert this
> into dummy variables
On Thu, 2007-06-28 at 18:16 -0500, Bingshan Li wrote:
> Hello everyone,
>
> I have a variable with several categories and I want to convert this
> into dummy variables and do logistic regression on it. I used
> model.matrix to create dummy variables but it always picked the
> smallest one as
Hello everyone,
I have a variable with several categories and I want to convert this
into dummy variables and do logistic regression on it. I used
model.matrix to create dummy variables but it always picked the
smallest one as the reference. For example,
model.matrix(~.,data=as.data.frame(l
On 6/28/07, Jim Price <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have recently been playing with the grid package in an attempt to create
> some pages containing multiple lattice plots on the same page. However, when
> I specify a grid layout with different widths, such as:
>
> pushViewport(viewport(
> Waverley <[EMAIL PROTECTED]> asked:
>
> Dear Colleagues,
>
> I am looking for a package or previous implemented R to subgroup and
> exaustively divide a vector of squence into 2 groups.
>
> --
> Waverley @ Palo Alto
Google "[R] Generating all possible partitions" and you will find some R cod
Lets assume your zcta data looks like this
set.seed(12345) ## temporary for reproducibility
zcta <- data.frame( zipcode=LETTERS[1:5], prop=runif(5) )
zcta
zipcode prop
1 A 0.7209039
2 B 0.8757732
3 C 0.7609823
4 D 0.8861246
5 E 0.4564810
This say
On 6/28/07, Alexandre Salvador <[EMAIL PROTECTED]> wrote:
> Selon [EMAIL PROTECTED]:
>
> > On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > I would like to add a reference line to lattice graphs, with the reference
> > > line
> > > being different according to the factor level.
> > >
The problem isn't the function call.
First, list1 returned by lstfun does not name its elements so nts$cda
won't work. See code change in lstfun.
Second, specifying nts$cda as the nam1 argument tells R to look for
the nts object in the environment in which ukn is called. However,
the nts obje
Dear John,
Perhaps I am mistaken in what you are trying to accomplish but it seems like
what is required is that you call lstfun() outside of ukn(). [and remove the
call to lstfun() in ukn()].
nts <- lstfun(myfile, aa, bb)
results <- ukn(dd1, "a", "b", nts$cda)
Alternatively, you can eliminate t
That's exactly what I need.
Thank's a lot!!
Earl F. Glynn wrote:
>
> "jastar" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>
>> Hi all,
>> I have a trouble - I need to write file in a very specyfic format.
>> I have two vectors which different lengths and one data.frame (or
>
Are you looking for pmax? (look at the help ?pmax and the examples and
see if that does what you want).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL P
Selon Deepayan Sarkar <[EMAIL PROTECTED]>:
> On 6/28/07, Alexandre Salvador <[EMAIL PROTECTED]> wrote:
> > Selon [EMAIL PROTECTED]:
> >
> > > On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > I would like to add a reference line to lattice graphs, with the
> reference
> > > > line
>
Selon [EMAIL PROTECTED]:
> On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I would like to add a reference line to lattice graphs, with the reference
> > line
> > being different according to the factor level.
> >
> > Example : Draw 3 dotplots for "a","b" and "c" factors, and then add
On Thu, 28 Jun 2007 14:18:52 -0700 Nordlund, Dan (DSHS/RDA) wrote:
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Marcus
> > Vinicius Sent: Thursday, June 28, 2007 1:32 PM
> > To: r-help@stat.math.ethz.ch
> > Subject: [R] Wilcoxon Rank Sum
Please... use and **read** the docs:
?max ---> pmax
Bert Gunter
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Afshartous, David
Sent: Thursday, June 28, 2007 1:20 PM
To: r-help@stat.math.ethz.ch
Subject: [R] applying max elementwise to two vectors
thanks all. yes, pmax(x,y) gets it straight away. sorry for missing
this
when I checked the docs.
-Original Message-
From: Greg Snow [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 28, 2007 5:26 PM
To: Afshartous, David; r-help@stat.math.ethz.ch
Subject: RE: [R] applying max elementwis
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of John Kane
> Sent: Thursday, June 28, 2007 12:04 PM
> To: R R-help
> Subject: [R] Function call within a function.
>
> I am trying to call a funtion within another function
> and I clearly am misunderst
The sample function has a prob argument that determines the
probabilities of each element being sampled, put your proportion of
women in there and see if that works for you.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> --
On Thu, 28 Jun 2007 16:19:39 -0400,
"Afshartous, David" <[EMAIL PROTECTED]> wrote:
> All,
> Is there one liner way to obtain the max per observation for two
> vectors? I looked at apply and lapply but it seems that groundwork
> would have to be done before applying either of those. The code bel
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Marcus Vinicius
> Sent: Thursday, June 28, 2007 1:32 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Wilcoxon Rank Sum Test.
>
> Dear,
>
> I'm using R software to evaluate Wilcoxon Rank Sum Test and
Hi,
I have recently been playing with the grid package in an attempt to create
some pages containing multiple lattice plots on the same page. However, when
I specify a grid layout with different widths, such as:
pushViewport(viewport(layout = grid.layout(1, 2, unit(c(2, 1), "null"
the indiv
> On Thu, 28 Jun 2007 08:14:44 -0400,
> D G Rossiter (DGR) wrote:
> Thanks to the four distinguished R'ers who answered. I have used
> Sweave intensively for over a year, and have poured through all the
> doc. as well as the help archives, and could find nothing on this. It
>
Thanks to the four distinguished R'ers who answered. I have used
Sweave intensively for over a year, and have poured through all the
doc. as well as the help archives, and could find nothing on this. It
is now "well known" to me! since it bit me, but it did cost me a day
of head-scratching
Dear,
I'm using R software to evaluate Wilcoxon Rank Sum Test and I' getting one
Warning message as this:
> C1dea_com
[1] 1.000 0.345 0.200 0.208 0.508 0.480 0.545 0.563 0.451 0.683 0.380 0.913
1.000 0.506
> C1dea_sem
[1] 1.000 0.665 0.284 0.394 0.509 0.721 0.545 0.898 0.744 0.683 0.382 0.913
1
All,
Is there one liner way to obtain the max per observation for two
vectors?
I looked at apply and lapply but it seems that groundwork would have to
be done before applying either of those. The code below does it but
seems
like overkill.
Thanks!
Dave
x = rnorm(10)
y = rnorm(10)
ind = which
I am interested in locating a script to implement a sampling scheme
that would basically make it more likely that a particular observation
is chosen based on a weight associated with the observation. I am
trying to select a sample of ~30 census blocks from each ZIP code area
based on the proportio
Hello R-users,
I have been trying to fit what I think is a simple mixed-effects model using
lmer (from lme4), but I've run into some difficulty that I have not been able
to resolve using the existing archives or Pinheiro and Bates (2000).
I am measuring populations (of birds) which change with
Perhaps, you can get the name of list element whit:
unlist(lapply(list_name, rownames))
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
On 28/06/07, Georg Ehret <[EMAIL PROTECTED]> wrote:
>
> Thank you Henrique,
> "rownames" also gives me the header of the table, bu
Hi Martin,
Could you please provide a minimal replicable example so that we can
investigate further.
Thanks,
Hadley
On 6/28/07, Martín Gastón <[EMAIL PROTECTED]> wrote:
>
> Hi R users,
> I am working with the fda package but when I call the function pca.fd I
> obtain a message error, which I ca
I am trying to call a funtion within another function
and I clearly am misunderstanding what I should do.
Below is a simple example.
I know lstfun works on its own but I cannot seem to
figure out how to get it to work within ukn. Basically
I need to create the variable "nts". I have probably
misse
Weijun --
If memory is a problem, you might try using the 'handler' argument of
xmlTreeParse. This provides access to each node as it is processed, so
that you can, for instance, choose to ignore nodes, or save only
numeric values, or ... I'm not sure whether the entire document is
read into a C '
Thank you Henrique,
"rownames" also gives me the header of the table, but not the name of the
list-element...
Any other idea?
Wishing you a good day, Georg.
**
Georg Ehret
Johns Hopkins University
Baltimore
On 6/28/07, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote:
>
> Try whit "rown
You actually got it right.
I didn't realize there was a difference between a data frame and
matrix. What is the difference any way? Seems like all two
dimensional arrays should be equivalent.
Kyle
> On Wed, 27 Jun 2007, Kyle Ellrott wrote:
>
>> I'm getting started in R, and I'm trying to
or just type:
pairs.default
b
On Jun 28, 2007, at 2:36 PM, Henrique Dallazuanna wrote:
> https://svn.r-project.org/R/branches/R-2-5-branch/src/library/
> graphics/R/pairs.R
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>
> On 28/06/07, Jiong Zhang, PhD <
XLSolutions Corporation (www.xlsolutions-corp.com) is making a last call
for our July 2007 "R/S-plus Fundamentals and
Programming
Techniques" : www.xlsolutions-corp.com/Rfund.htm
In Boston *** July 16 - 17, 2007
Reserve your seat now at the early bird rates! Payment due AFTER
the class
Course
I realize that the following has been talked about on this list many
times before in some related way but I
am going to ask for help anyway because I still don't know what to do.
Suppose I have no intercept models such as the following :
Y = B*X_1 + error
Y = B*X_2 + error
Y = B*X_3 + error
Y =
https://svn.r-project.org/R/branches/R-2-5-branch/src/library/graphics/R/pairs.R
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
On 28/06/07, Jiong Zhang, PhD <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I typed "pairs" to see its code but did not get what I want. How d
Hi All,
I typed "pairs" to see its code but did not get what I want. How do I
see its code?
What I am trying to do, is to stack about 10 scatter plots on one page
as the way "pairs" does. I have about 150 variables in my table.
Instead of plotting 150X150 pairs using "pairs", I only need to plo
Try whit "rownames".
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
On 28/06/07, G E <[EMAIL PROTECTED]> wrote:
>
> Hello R:
>I am working with a self-defined function and I wish to subject a list
> (t) to this function. My list is a list of tables:
> $rs7609589
>
Hello everyone,
So I ran an anova with aov and then I want to run post-hoc comparisons but
keep receiving this message :
> no applicable method for "TukeyHSD"
Here is my code:
> d<-read.table("d.txt")
> d
>Obs subj Hand GazeRT
> 11 s111 401.4
> 22 s211 363.3..
Hello R:
I am working with a self-defined function and I wish to subject a list
(t) to this function. My list is a list of tables:
$rs7609589
2/2 2/4 4/4 2/2 2/4 4/4
89 188 87 89 188 87
$rs3909907
1/1 1/4 4/4
94 178 92
$rs12748004
0/0 1/3 3/3
37 150 177
$rs6695928
2/2 2/4 4/4
35 12
At 09:58 28/06/2007, Chung-hong Chan wrote:
>OpenBUGS should be something related to Bayesian statistics.
>
>You may refer to Chapter 12 of Handbook
>http://cran.r-project.org/doc/vignettes/HSAUR/Ch_meta_analysis.pdf
>It talks about meta-regression.
>
>
>
>On 6/28/07, Monica Malta <[EMAIL PROTECTED
Hi R users,
I am working with the fda package but when I call the function pca.fd I
obtain a message error, which I cann't identify. The error say That :
error in assihn(mname,def,where), is not possible to add links to a
blockade enviroment.
The orther that I'm writting is:
> cp1 <- pca.fd(ind.
Hi,
Could someone point me in the right direction for documentation on the
following question?
Let's say I have two objects a and b of classes A and B, respectively.
Now let's say I write a function foo that does something similar to
objects of type A and B. Basically I want to overload the fu
"jastar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Hi all,
> I have a trouble - I need to write file in a very specyfic format.
> I have two vectors which different lengths and one data.frame (or matrix).
> I want to write it to "*.txt" file in following way:
> 1st row of fil
On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I would like to add a reference line to lattice graphs, with the reference
> line
> being different according to the factor level.
>
> Example : Draw 3 dotplots for "a","b" and "c" factors, and then add an
> horizontal line at y=10 for pane
Hello:
Two questions about R.matlab:
1. How to break a hung R-Matlab connection?
2. How to execute R.matlab commands from within a function?
BREAKING AN R-Matlab CONNECTION
Sometimes an attempted R.matlab command locks up my computer. The
st
TukeyHSD takes an aov object, not an aovlist object.
The result of aov() with an Error() term is an aovlist object.
In the HH package, see ?MMC for an example of how to work
around this limitation. See the maiz example.
Rich
__
R-help@stat.math.ethz.c
Sorry Jacques and all the other helpful people!
I made a mistake because I didn´t realize that I have a vector only
containing NAs. That happened during standardization and i didn´t
check this.
I apologize for that.
Greetings
Birgit
Am 28.06.2007 um 15:17 schrieb Jacques VESLOT:
> you may
Are you sure that Tukey's HSD (or any other usual multiple comparison
procedure) applies to within-subject factors?
I do not have my stats books (e.g. Winer or Kirk) to check.
You can get some output with:
TukeyHSD(aov(hand:gaze+subject))
(assuming you ant to compare the cells defined by hand:g
On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I would like to add a reference line to lattice graphs, with the reference
> line
> being different according to the factor level.
>
> Example : Draw 3 dotplots for "a","b" and "c" factors, and then add an
> horizontal line at y=10 for pan
Dear R gurus
I have a question regarding the function embedFonts().
I assume the in that function which calls gs, the bounding box
of the eps file is changed. Is that by intention? Do I have
call explicitly some gs-options to avoid it and if yes, how?
Thank you very much for your help.
Best reg
Dear list members,
I switched from Splus to R a few years ago and so far found no
functionality missing.
However, I am struggling to find the equivalent align() function for
time series. I did find some reduced functionality such as
alignDailySeries in package:fCalendar but the full capability o
Hi Birgit
No, you do not have to write all 85 vectors in the first line. I just did not
fully appreciate what you were trying to do.
You could use the "get" option as was suggested somewhere else.
So, if your vectors are V1 to V2 (i.e. 85) say, something like:
V1<-c(1,2,3)
V2<-c(5,2,7)
.
I would like to add a reference line to lattice graphs, with the reference line
being different according to the factor level.
Example : Draw 3 dotplots for "a","b" and "c" factors, and then add an
horizontal line at y=10 for panel "a", y=8 for panel "b" and y=6 for panel "4"
I tried the code bel
On Thu, 28 Jun 2007, Peter Dalgaard wrote:
> Prof Brian Ripley wrote:
>>
>>
>> This is explained in ?regexp (in the See Also of ?regexpr):
>>
>> Patterns are described here as they would be printed by 'cat': _do
>> remember that backslashes need to be doubled when entering R
>> c
Hello Patrick,
this does not work and gives following warning message:
for(i in 1:85) range(get(paste("V", i, sep="")), na.rm=TRUE)
Warning messages:
1: kein nicht-fehlendes Argument für min; gebe Inf zurück
2: kein nicht-fehlendes Argument für max; gebe -Inf zurück
This works but also with the
Thanks Christophe,
I received already an answer with a similar suggestion.
But thanks for your answer.
Birgit
Am 28.06.2007 um 12:34 schrieb Christophe Pallier:
> Your V1 to V85 are probably coming from a data.frame, aren't they?
>
> If yes, and if this data.frame is named 'a', you can use 's
Hello John,
I tried this code. But I got only the ranges of V1 and V2 what is
easily understandable.
Do I have to write in all 85 vectors in the first line?
V<-list(a=c(V1), b=c(V2))
for ( i in 1:85 ) { # 2 vectors (replace with 85 ...)
+ print(range (V[i], na.rm = TRUE))
+ }
sa
Thats not the case.
I have two vectosr with a lot of NAs, but not only NAs.
But nevertheless as i saw the results are accurate.
Birgit
Am 28.06.2007 um 15:17 schrieb Jacques VESLOT:
> you may have a vector with only NA values in it...
>
> max(c(NA,NA), na.rm=T)
> [1] -Inf
> Warning message:
>
Birgit Lemcke wrote:
> Thanks that was really a quick answer.
>
> It works but I get this warning message anyway:
>
> 1: kein nicht-fehlendes Argument f�r min; gebe Inf zur�ck (None not-
> lacking argument for min; give Inf back)
> 2: kein nicht-fehlendes Argument f�r max; gebe -Inf zur�ck
>
> wha
I am new to R. We have a binary package that was not maintained for
about a year, and the original maintainer is not around anymore.
The package used to work in R-1.5.1. I used the following steps
to install this package in R-2.4 on WinXP:
Started the GUI
Went into the menu "Packages" and s
On Thu, 28 Jun 2007, Karl Knoblick wrote:
> Dear R-Community!
>
> The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov
> and lme without interaction term and the results are the same.
> But I have problems to reproduce the example aov with interaction in MASS
> (10.2, p.30
I have a time series (count) data.. Can you tell me the command for the
parametric bootstrapping. My parameters are var to mean ratio and mean run
length...
--
[EMAIL PROTECTED]
Regina M.Verghis,
[[alternative HTML version deleted]]
__
R-help@s
Karl Knoblick wrote:
> Dear R-Community!
>
> The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov
> and lme without interaction term and the results are the same.
> But I have problems to reproduce the example aov with interaction in MASS
> (10.2, p.301) with lme. Here the
you may have a vector with only NA values in it...
max(c(NA,NA), na.rm=T)
[1] -Inf
Warning message:
aucun argument pour max ; -Inf est renvoyé
Jacques VESLOT
INRA - Biostatistique & Processus Spatiaux
Site Agroparc 84914 Avignon Cedex 9, France
Tel: +33 (0) 4 32 72 21 58
Fax: +33 (0) 4 32 72 21
Prof Brian Ripley wrote:
>
>
> This is explained in ?regexp (in the See Also of ?regexpr):
>
> Patterns are described here as they would be printed by 'cat': _do
> remember that backslashes need to be doubled when entering R
> character strings from the keyboard_.
>
> and in the R
I've rolled up R-2.5.1.tar.gz a short while ago. This is a maintenance
release and fixes a number of mostly minor bugs and platform issues. See
the full list of changes below.
You can get it (in a short while) from
http://cran.r-project.org/src/base/R-2/R-2.5.1.tar.gz
or wait for it to be mirro
Monica Malta wrote:
> Dear colleagues,
>
> I'm conducting a meta-analysis of studies evaluating adherence of
> HIV-positive drug users into AIDS treatment, therefore I'm looking for some
> advice and syntax suggestion for running the meta-regression using
> proportions, not the usual OR/RR freq
Thanks for your help. I can weight the variances in the 2 groups using
"weights", as in
lme(Y~1+time+sex+age, random=~1|indv,
correlation=corAR1(form=~time|indv),
weights=varIdent(form=~1|sex),method="ML")
but what I would like is to have a different "phi" estimate for each
gender, not just diffe
Romain Francois wrote:
>
> There is also a pretty useful operator %w/o% in the help page of
> %in%. see :
>
> > ?`%in%`
> > a <- c(1,2,3,4,5,6,7,8,9)
> > b <- c(3,10,20,5,6)
> > b %w/o% a
> [1] 10 20
>
I don't like the example. It's not obvious, in the expression...
x[!x %in% y]
... tha
On Thu, 2007-06-28 at 17:29 +0800, R. Leenders wrote:
> Hi, I am pretty new to R, so I apologize for the obvious question.
> I
> have worked with R for a few months now and in the process have written
> several functions that I frequently use in various data analysis
> projects. I tend to give each
Hi all,
I have a trouble - I need to write file in a very specyfic format.
I have two vectors which different lengths and one data.frame (or matrix).
I want to write it to "*.txt" file in following way:
1st row of file is my 1st vector (separate by spacebar)
2nd row of file is 2nd vector (also sep
One "quick and dirty" way is to put all your functions inside a file, say
/home/me/R/myfuncs.R, and add the following line at the beginning of your
scripts:
source('/home/me/R/myfuncs.R')
This is dirty because if you need to change the location of this file, your
scripts will cease to work.
Alte
Dear R-Community!
The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov and
lme without interaction term and the results are the same.
But I have problems to reproduce the example aov with interaction in MASS
(10.2, p.301) with lme. Here the script:
library(MASS)
library(
Christophe Pallier wrote:
> On 6/28/07, João Fadista <[EMAIL PROTECTED]> wrote:
>
>> I would like to take out the values from one vector that are equal to the
>> values in another vector.
>>
>> Example:
>> a <- c(1,2,3,4,5,6,7,8,9)
>> b <- c(3,10,20,5,6)
>> b_noRepeats = c(10,20)
>>
>>
>>
>
Hello,
I'm trying to use Mclust to fit a Gaussian Mixture Model to a
mulitdimensional data set.
Because of the specific source of my data, I know that all components
have the same variance and that the covariance between dimensions is
zero (modelname=VII).
Furthermore, I have a reliable estimate
look at setdiff(), e.g.,
setdiff(b, a)
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kul
Your V1 to V85 are probably coming from a data.frame, aren't they?
If yes, and if this data.frame is named 'a', you can use 'sapply(a,range)'
Otherwise, see ?get (get(paste("V","1",sep="")) returns V1)
Christophe
On 6/28/07, Birgit Lemcke <[EMAIL PROTECTED]> wrote:
>
> Hello,
> (Power Book G4,
Hi, I am pretty new to R, so I apologize for the obvious question.
I
have worked with R for a few months now and in the process have written
several functions that I frequently use in various data analysis
projects. I tend to give each project a directory of its own and set
the working directory to
Hi
I think a for loop would be more what you want.
Something along the lines of:
V<-list(a=c(1,2,3), b=c(2,3,4)) # list of 2 vectors
for ( i in 1:2 ) { # 2 vectors (replace with 85 ...)
print(range (V[i], na.rm = TRUE))
}
Regards
JS
---
-Original Message-
From: [EM
setdiff(b,a) is even simpler.
On 6/28/07, Christophe Pallier <[EMAIL PROTECTED]> wrote:
>
>
>
> On 6/28/07, João Fadista <[EMAIL PROTECTED]> wrote:
> >
> > I would like to take out the values from one vector that are equal to
> > the values in another vector.
> >
> > Example:
> > a <- c(1,2,3,4,5,
Thanks that was really a quick answer.
It works but I get this warning message anyway:
1: kein nicht-fehlendes Argument für min; gebe Inf zurück (None not-
lacking argument for min; give Inf back)
2: kein nicht-fehlendes Argument für max; gebe -Inf zurück
what does this mean?
Greeting and than
setdiff(b, a)
2007/6/28, João Fadista <[EMAIL PROTECTED]>:
> Dear all,
>
> I would like to take out the values from one vector that are equal to the
> values in another vector.
>
> Example:
> a <- c(1,2,3,4,5,6,7,8,9)
> b <- c(3,10,20,5,6)
> b_noRepeats = c(10,20)
>
> So I would like to have the
On 6/28/07, João Fadista <[EMAIL PROTECTED]> wrote:
>
> I would like to take out the values from one vector that are equal to the
> values in another vector.
>
> Example:
> a <- c(1,2,3,4,5,6,7,8,9)
> b <- c(3,10,20,5,6)
> b_noRepeats = c(10,20)
>
>
b[!(b %in% intersect(a,b))]
See ?intersect
-
sapply(1:85, function(i) eval(parse(text=paste("range(V", i, ",
na.rm=T)", sep=""
Jacques VESLOT
INRA - Biostatistique & Processus Spatiaux
Site Agroparc 84914 Avignon Cedex 9, France
Tel: +33 (0) 4 32 72 21 58
Fax: +33 (0) 4 32 72 21 84
Birgit Lemcke a écrit :
> Hello,
> (Power Book G4,
Dear all,
I would like to take out the values from one vector that are equal to the
values in another vector.
Example:
a <- c(1,2,3,4,5,6,7,8,9)
b <- c(3,10,20,5,6)
b_noRepeats = c(10,20)
So I would like to have the vector b without the same values as vector a.
Kind regards,
João Fadista
Hello,
(Power Book G4, Mac OS X, R 2.5.0)
I would like to repeat the function range for 85 Vectors (V1-V85).
I tried with this code:
i<-0
> repeat {
+ i<-i+1
+ if (i<85) next
+ range (Vi, na.rm = TRUE)
+ if (i==85) break
+ }
I presume that the Vi is wrong, because in this syntax i is not known
Hello,
I have a vector of samples x of length N. Associated with each
sample x_i is a certain weight w_i. All the weights are in another
vector w of the same length N.
I have another vector of samples y of length n (small n). All
these samples have equal weights 1/n. The ECDF of these samples
1 - 100 of 107 matches
Mail list logo