Hello,
Which package allows to use Cochrana-Armitage trend test? I tried to search for
but I found only package coin in which there is no explicit function.
Best,
RobMac
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Hi Borja
library(elliptic)
?myintegrate
HTH
rksh
Borja Soto Varela wrote:
Dear R-user
I need a function to approximate a complex integration. My function is:
aprox2=function(s,x,rate){
dexp(x,rate)*exp(-s*x)
}
where argument s is a complex number. I can't use the integrate function
b
Duncan Murdoch wrote:
> On 11/12/2008 9:45 PM, Mike Rowe wrote:
>> Greetings!
>>
>> I come to R by way of Matlab. One feature in Matlab I miss is its
>> "end" keyword. When you put "end" inside an indexing expression, it
>> is interpreted as the length of the variable along the dimension being
>>
On Fri, Dec 12, 2008 at 2:10 AM, dinesh kumar wrote:
> Dear R users
>
> I have a similarity matrix 100X100. I used this matrix as adjacency matrix
> to generate igraph graph object. Its a fully connected graph. The similarity
> score is the weight of the edge. Now I want to remove all possible low
On Fri, 12 Dec 2008, Duncan Murdoch wrote:
On 11/12/2008 9:45 PM, Mike Rowe wrote:
Greetings!
I come to R by way of Matlab. One feature in Matlab I miss is its
"end" keyword. When you put "end" inside an indexing expression, it
is interpreted as the length of the variable along the dimension
On 12/12/2008 3:41 AM, Wacek Kusnierczyk wrote:
Duncan Murdoch wrote:
On 11/12/2008 9:45 PM, Mike Rowe wrote:
Greetings!
I come to R by way of Matlab. One feature in Matlab I miss is its
"end" keyword. When you put "end" inside an indexing expression, it
is interpreted as the length of the v
valeria pedrina wrote:
hi all,
I want to do a plot and put the legend on the left of y axis this is my
code:
x<-seq(1980,2005,1)
plot(x,tfa_ita,type="l",col=1,xlim=c(1979,2005),ylim=c(0.2,1.7),xlab="",ylab="",main="Totale
Attivita` Finanziarie")
lines(x,tfa_spa,type="l",col=2)
lines(x,tfa_aus,t
Dear all,
I've got a list
L <- list(L1 = list
(foo = "bar"
, SL = NULL
)
, L2 = list
(
foo = "bar"
, SL = list
(SSL1 = list
(DF = data.frame(val = 21, foo = "bar")
, DFOO = list(foo = "foo
Thanks
On Thu, Dec 11, 2008 at 10:19 AM, Jochen Knaus wrote:
> Dear Mr. Ripley,
>
> indeed that it true. sfInit() currently have a bug on Windows depending on
> the usage of the Linux tools and the broken Exceptionhandling. Too bad I
> never tested it accordingly on Windows (as we do not have any
Hi there,
I have a question regarding a data set that looks like the following:
8 repeated measurements for 3 dosage levels. However, the measurements
for each dosage levels are taken on a different group of subjects.
example:
subject time dosage measure
11
1
1
Hello everyone.
This is a question regarding generation of the concordance index (c
index) in R using the function rcorr.cens. In particular about
interpretation of its direction and form of the 'predictor'.
One of the arguments is a "numeric predictor variable" ( presumably
this is just a *si
Dear list,
> Learning to use the power of R's indexing and functios like head() and
> tail() (which are just syntactic sugar) will probably lead you not to miss
> this.
However, how do I exclude the last columns of a data.frame or matrix (or, in
general, head and tail for given dimensions of an a
Try this:
rapply(L, c)[grep("\\.val$", names(rapply(L, c)))]
On Fri, Dec 12, 2008 at 7:55 AM, wrote:
> Dear all,
> I've got a list
> L <- list(L1 = list
> (foo = "bar"
> , SL = NULL
> )
> , L2 = list
> (
> foo = "bar"
> , SL = l
Thank you very much for this. But since I don't know much of DLL, I am
kind of a stuck with how to proceed with 'reuters_ts1.zip'. This zip
file contains the 'reuters_ts.dll' file.
dyn.load("reuters_ts.dll") generates the error,
> dyn.load("Z:\\reuters_ts1\\package\\reuters_ts.dll")
Error in inDL
Shubha
I suspect it may be because it cannot find a dependent DLL. I'll email you
off-list and we can work through it.
Cheers
Rory
Rory Winston
RBS Global Banking & Markets
Office: +44 20 7085 4476
-Original Message-
From: Shubha Vishwanath Karanth [mailto:shub...@ambaresearch.com]
Se
On 12/12/2008 3:29 AM, robert-mcfad...@o2.pl wrote:
> Hello,
> Which package allows to use Cochrana-Armitage trend test? I tried to search
> for but I found only package coin in which there is no explicit function.
But there is this example in coin:
### Cochran-Armitage trend test for proporti
On Thu, Dec 11, 2008 at 1:38 PM, Vitalie Spinu wrote:
> Tom Short's card is an excellent one but it does not cover high level
> packages like plyr, reshape, DoBy, and a few base data.manip functions are
> not there as well.
>
I'm not sure whether this can (partially) fill the gap, but Quick-R
[1]
Hello r-help
I want to save my dataframe as an ascii file.
a bit of my data frame:
> vmsrina[1:100,]
CKRDYRNR CHRNR cowno dek lakt flow peakflow
1 3596600182 35966 182 9383 3.0527442 3.18
2 3596600182 35966 182 9393 1.8978755 3.06
3 3596600182 35966
How about:
x[, -seq(to=ncol(x), length=n)]
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Claudia Beleites wrote:
Dear list,
Learning to use the power of R's indexing and functios like head() an
To the R users community:
(We apologize for multiples copies) (Please distribute)
---
1st Call for Papers - 2nd International Symposium on Distributed Computing
and Artificial Intelligence (DCAI'09)
June 10th - 12th , 2009 -
On 12/12/2008 6:58 AM, Rina Oldager Miehs wrote:
Hello r-help
I want to save my dataframe as an ascii file.
a bit of my data frame:
vmsrina[1:100,]
CKRDYRNR CHRNR cowno dek lakt flow peakflow
1 3596600182 35966 182 9383 3.0527442 3.18
2 3596600182 35966 182 939
Duncan Murdoch wrote:
> On 12/12/2008 3:41 AM, Wacek Kusnierczyk wrote:
>>
>> but this 'general rule' is not really adhered to in r! one example
>> already discussed here at length is subset:
>>
>> subset(data.frame(...), select=a)
>>
>> what will be selected? column named "a", or columns named b
Duncan Murdoch wrote:
> On 11/12/2008 9:45 PM, Mike Rowe wrote:
>
>>
>> this.matrix[3:end,end]
>>
>> would be equivalent to:
>>
>> this.matrix[3:nrow(this.matrix),ncol(this.matrix)] # or
>> this.matrix[3:dim(this.matrix)[1],dim(this.matrix)[2]]
>>
>> As you can see, the R version requires more ty
> From which you might conclude that I don't like the design of subset, and
> you'd be right. However, I don't think this is a counterexample to my
> general rule. In the subset function, the select argument is treated as an
> unevaluated expression, and then there are rules about what to do with
I am still struggling to map a character string to an object name and
vice versa in R.
I thought the as.name() function might work, but observe the following
behaviour ...
> attach(warpbreaks)
> levels(tension)
[1] "L" "M" "H"
> levels(as.name("tension"))
NULL
> objectname<-as.name("tension")
>
Its a FAQ:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-turn-a-string-into-a-variable_003f
On Fri, Dec 12, 2008 at 8:30 AM, Philip Whittall
wrote:
>
> I am still struggling to map a character string to an object name and
> vice versa in R.
> I thought the as.name() function might work,
Chuck Cleland wrote:
> On 12/12/2008 3:29 AM, robert-mcfad...@o2.pl wrote:
>> Hello,
>> Which package allows to use Cochrana-Armitage trend test? I tried to search
>> for but I found only package coin in which there is no explicit function.
>
> But there is this example in coin:
>
> ### Cochra
Hello all,
Does anyone know if there exists any function in R that resembles the
"lincom" and "nlcom" of STATA?. These functions computes point estimates,
standard errors, significance levels, confidence intervals, etc. for linear
and non linear combinations of previous estimated parameters. Down
Am Freitag 12 Dezember 2008 13:10:20 schrieb Patrick Burns:
> How about:
>
> x[, -seq(to=ncol(x), length=n)]
Doing it is not my problem. I just agree with Mike in that I would like if I
could do shorter than:
x[, 1 : (ncol(x) - n)]
which I btw prefer to your solution.
Also, I don't have a pro
Daren Tan wrote:
Hi,
I keep getting the error message and a pop-up window for selecting CRAN mirror server from Rgui.exe after setting the R_Libs
Warning in install.packages(necessary[!installed], dep = T) :
argument 'lib' is missing: using 'D:/Program Files/R/R-2.8.0.libs'
This is a w
-- Weitergeleitete Nachricht --
Betreff: Re: [R] The end of Matlab
Datum: Freitag 12 Dezember 2008
Von: Claudia Beleites
An: r-help@r-project.org
Am Freitag 12 Dezember 2008 13:10:20 schrieb Patrick Burns:
> How about:
>
> x[, -seq(to=ncol(x), length=n)]
Doing it is not my prob
When R starts I get the following error message
Warning message:
In grep(paste("[{]TclEval ", topic, "[}]", sep = ""), tclvalue(.Tcl("dde
services TclEval {}")), :
argument 'useBytes = TRUE' will be ignored
Has anyone else run into this issue and is there any way to can fix this?
Thanks,
Patri
And the *Error* message was (that was a warning)?
The warning comes from some contributed code, probably in Tinn-R. Please
find out where it is and ask the maintainer for a fix. But it looks
harmless enough.
On Fri, 12 Dec 2008, Richardson, Patrick wrote:
When R starts I get the following
Claudia Beleites wrote:
> Am Freitag 12 Dezember 2008 13:10:20 schrieb Patrick Burns:
>
>> How about:
>>
>> x[, -seq(to=ncol(x), length=n)]
>>
> Doing it is not my problem. I just agree with Mike in that I would like if I
> could do shorter than:
>
> x[, 1 : (ncol(x) - n)]
>
> which I bt
I have asked the maintainer for a fix and didn't get a reply, which is why I
posted to the list to see if there were any other ideas.
Sorry to bother. . . with my warning message.
Patrick
-Original Message-
From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk]
Sent: Friday, December 1
On 12/12/2008 8:25 AM, hadley wickham wrote:
From which you might conclude that I don't like the design of subset, and
you'd be right. However, I don't think this is a counterexample to my
general rule. In the subset function, the select argument is treated as an
unevaluated expression, and the
Any tips?
DaveT.
>-Original Message-
>From: Thompson, David (MNR)
>Sent: December 9, 2008 04:03 PM
>To: 'r-help@r-project.org'
>Subject: assign()ing within apply
>
>Hello,
>
>I'm trying to convert a character column in several dataframes
>to lower case.
>
>###
>#
># Sample data and 'spp
>> Wacek:
>>
>>
>>> x[3:]
>>> instead of
>>> x[3:length(x)]
>>> x[3:end]
>>>
>>>
>> I don't think that would help:
>> what to use for end - 3 within the convention that negative values mean
>> exclusion?
>>
>>
>>
>>
>
> might seem tricky, but not impossible:
>
> x[-2]
Please, can you tell me if you know how can i use the library Igraph in C#
?
Thanks
Nadifi Taoufik
*
This message and any attachments (the "message") are con...{{dropped:15}}
__
R-
The following error occurs every now and then by calling a function of wmTSA
package:
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1", "0")) :
invalid 'row.names' length
I would greatly appreciate some guidelines about how to catch such an error
upon its occurrence and have it handl
Thanks very much for the replies.
Both suggestions worked perfectly.
That's one more step towards understanding R.
Thanks again.
--
View this message in context:
http://www.nabble.com/Row-order-in-plot-tp20962774p20974800.html
Sent from the R help mailing list archive at Nabble.com.
__
Bonjour!
Je suis en train de faire un projet utilisant Affymatrix mais j'ai un problème à
télécharger un package depuis R: une fois que je télécharge le package et je
demande de faire "rma" ca sort l'erreur suivante et je n'ai aucune idée de
comment je pourrais faire.
> library(preprocessCore)
>
Is there any way to handle errors retuened by R functions ... something like
the exception handling in C++ ?
Thank you so much,
Maura
Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e
tutti i telefonini TIM!
Vai su http://maileservizi.alice.it/alice_messenger/index.htm
Dear All,
Apologies for sending this email to both list, but at this point I'm not
sure which one could help me the most.
I have 4 sets of data, 1 test and 3 different sets of controls.
The measurements are binary, with a matrix of 0 and 1
I'm measuring across time (rows, ~815) the behaviour of
Dear Dr. Harrell,
Thanks for response so quickly. Here is example code to illustrate the
problem.
> n <- 1000
> set.seed(731)
> age <- 50 + 12*rnorm(n)
> label(age) <- "Age"
> sex <- factor(sample(c('Male','Female'), n,
+ rep=TRUE, prob=c(.6, .4)))
> cens <- 15*runif(n)
> h <- .02*e
I have managed to get rid the two warning messages simply by uninstalling and
installing again R. Very likely that I disrupted the installation of a large
package.
> Date: Fri, 12 Dec 2008 15:07:38 +0100
> From: lig...@statistik.tu-dortmund.de
> To: dare...@hotmail.com
> CC: r-h...@stat.math.e
paste()
?paste
- Original Message -
From: "Philip Whittall"
To:
Sent: Friday, December 12, 2008 1:30 PM
Subject: Re: [R] Extracting the name of an object into a character string
and vice versa
I am still struggling to map a character string to an object name and
vice versa in R
Re. Workshop on Directions in Statistical Computing, Copenhagen 13-14
July 2009.
http://www.r-project.org/dsc-2009
The web interface for registration and submission of abstracts is now open.
(The site is still under construction in a number of respects. In
particular, we haven't negotiated disco
> > Wacek:
> >> x[3:]
> >> instead of
> >> x[3:length(x)]
> >> x[3:end]
> >
> > I don't think that would help:
> > what to use for end - 3 within the convention that negative values mean
> > exclusion?
>
> might seem tricky, but not impossible:
>
> x[-2]
> # could mean 'all except for 2nd', as it i
Is try() what you're looking for?
Sarah
On Fri, Dec 12, 2008 at 5:43 AM, wrote:
> Is there any way to handle errors retuened by R functions ... something like
> the exception handling in C++ ?
>
> Thank you so much,
> Maura
>
> Alice Messenger ;-) chatti anche con gli amici di Windows Live Mes
Here is how to emulate matlab end in R in the case of matrices.
Rather than redefine the matrix class (which would be a bit intrusive) we
just define a subclass of matrix called matrix2. Note in the examples that
matrix2 survives some operations such as + but not others such as crossprod
so in th
Dear list,
I have a variable that consists of typed responses. I wish to compute
a variable equal to the number of characters in the original variable.
For example:
> x <- c("convert this to 32 because it has 32 characters", "this one has 22
> characters", "12 characters")
[Some magic function h
I just realized that my idea of doing something without going into the
extraction functions itself won't work
:-( it was a nice dream, though.
The reason is that there is no general way to find out what the needed length
is: At least I'm just writing a class where 2 kinds of columns are involve
On Fri, 12 Dec 2008 12:43:17 +0100, Liviu Andronic
wrote:
I'm not sure whether this can (partially) fill the gap, but Quick-R
[1] has a decent overview of data manipulation, and is essentially a
reference card. The maintainer of the Web site is open to
improvements, so it might make sense to
nchar (c("convert this to 47 because it has 47 characters", "this one has 26
characters", "13 characters"))
HTH Claudia
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 (0 40) 5 58-34 47
Claudia Beleites wrote:
>>> Wacek:
>>>
x[3:]
instead of
x[3:length(x)]
x[3:end]
>>> I don't think that would help:
>>> what to use for end - 3 within the convention that negative values mean
>>> exclusion?
>>>
>> might seem tricky, but not impossible:
Hi
r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10:
> Dear list,
> I have a variable that consists of typed responses. I wish to compute
> a variable equal to the number of characters in the original variable.
> For example:
>
> > x <- c("convert this to 32 because it has 32 charact
On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote:
> Hi
>
>
> r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10:
>
>> Dear list,
>> I have a variable that consists of typed responses. I wish to compute
>> a variable equal to the number of characters in the original variable.
>> For exam
Or :
nchar(gsub("[[:space:]]", "", x))
On Fri, Dec 12, 2008 at 2:00 PM, Petr PIKAL wrote:
> Hi
>
>
> r-help-boun...@r-project.org napsal dne 12.12.2008 16:31:10:
>
> > Dear list,
> > I have a variable that consists of typed responses. I wish to compute
> > a variable equal to the number of cha
Thanks to everyone who responded. This turns out to be amazingly easy.
To count characters including spaces:
nchar(x)
To count characters excluding spaces:
nchar(gsub(" *","",x))
Thanks!
On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL wrote:
> Hi
>
>
> r-help-boun...@r-project.org napsal dne 12.12.
Besides the impute package, are there others that have alternative impute
approaches ? I hope to compare their performances.
Thanks
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide ht
Hello all,
Does anyone know if there exists any function in R that resembles the
"lincom" and "nlcom" of STATA?. These functions computes point
estimates, standard errors, significance levels, confidence intervals,
etc. for linear and non linear combinations of previous estimated
parameters. Down
Hi,
I'm working on leaf characteristics of trees. Each tree is characterised by
about 10 leaf traits.
The trees were sampled at 9 different locations (about 20 to 30
trees/location, NOT balanced), grouped in 3 different climatic zones
(Sahelian, Soudanian and Guinean) (NOT balanced).
Further, eac
On Fri, Dec 12, 2008 at 11:05 AM, Ista Zahn wrote:
> Thanks to everyone who responded. This turns out to be amazingly easy.
> To count characters including spaces:
> nchar(x)
> To count characters excluding spaces:
> nchar(gsub(" *","",x))
The * is unnecessary.
>
> Thanks!
>
> On Fri, Dec 12, 20
Something strange. The lapply only processed the first row and then wrote
that value to every row of the original dataframe. It is as if the lapply is
indeed processing every item on the list, namely each column, but the ifelse
or the as.Date is getting messed up. Not only is it only processing the
Just to muddy the waters a bit further. Currently we can do things like:
> pascal.tri <- numeric(0)
> class(pascal.tri) <- 'pasctri'
>
> `[.pasctri` <- function(x, ...) {
+ dots <- list(...)
+ n <- dots[[1]]
+ row <- choose(n, 0:n)
+ if(length(dots) > 1) {
+ row <- row[ dots[[2]] ]
+ }
+ row
+ }
On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch wrote:
> On 12/12/2008 8:25 AM, hadley wickham wrote:
>>>
>>> From which you might conclude that I don't like the design of subset, and
>>> you'd be right. However, I don't think this is a counterexample to my
>>> general rule. In the subset functi
I got the whole thing to work, with Hadley Wickham's help.
is.POSIXt <- function(x) inherits(x, "POSIXt")
dates <- sapply(df, is.POSIXt)
df[dates] <-lapply(df[dates], as.Date)
Farrel Buchinsky
On Fri, Dec 12, 2008 at 11:26, Farrel Buchinsky wrote:
>
> Something strange. The lapply only proce
On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham wrote:
You could also imagine similar iterators for random sampling, like
samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80%
with replacement. first(n) could also be useful, selecting the first
min(n, length(vector)) observatio
Hi,
We are trying to classify atmospheric patterns using PCA and kmeans. In
T-mode, the (non-normalized) loadings of the PCs are used as input
variables for the k-means classification.
As first step we perform PCA using "princomp" but the computed loadings
produced by princomp are normalized
I want to write a function mimic the function of select.list(), here
is my preliminary version.
select <- function(x,multiple=TRUE,...){
ans<-new.env()
g <- gwindow(title=title,wid=200,heigh=500)
x1<-ggroup(FALSE,con=g)
x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE)
gbutton("OK",con=x1,handler
On 12/12/2008 11:38 AM, hadley wickham wrote:
On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch wrote:
On 12/12/2008 8:25 AM, hadley wickham wrote:
From which you might conclude that I don't like the design of subset, and
you'd be right. However, I don't think this is a counterexample to my
ge
On Fri, Dec 12, 2008 at 11:18 AM, Duncan Murdoch wrote:
> On 12/12/2008 11:38 AM, hadley wickham wrote:
>>
>> On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch
>> wrote:
>>>
>>> On 12/12/2008 8:25 AM, hadley wickham wrote:
>
> From which you might conclude that I don't like the design of su
On Fri, Dec 12, 2008 at 11:11 AM, Vitalie Spinu wrote:
> On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham
> wrote:
>
>> You could also imagine similar iterators for random sampling, like
>> samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80%
>> with replacement. first(n) could a
Erin Hodgess gmail.com> writes:
>
> Dear R People:
>
> Are there functions for spatial AR and ARIMA models in R, please?
Would looking at the "Spatial" task view on your CRAN mirror help? If by AR
you mean simultaneous or conditional autoregressive models using spatial
weights (or moving ave
On Fri, Dec 12, 2008 at 12:11 PM, Vitalie Spinu wrote:
> On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham
> wrote:
>
>> You could also imagine similar iterators for random sampling, like
>> samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80%
>> with replacement. first(n) could a
On 12/12/2008 12:23 PM, hadley wickham wrote:
On Fri, Dec 12, 2008 at 11:18 AM, Duncan Murdoch wrote:
On 12/12/2008 11:38 AM, hadley wickham wrote:
On Fri, Dec 12, 2008 at 8:41 AM, Duncan Murdoch
wrote:
On 12/12/2008 8:25 AM, hadley wickham wrote:
From which you might conclude that I don
After installing a new version of R, how do I make the packages that I
have already installed and use on the old version available to the new
version?
Thank you,
Roy Robertson
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinf
>> Oh yes, that's a good point. But wouldn't the following do the job?
>>
>> "&.selector" <- function(a, b) {
>> function(n) a(n) & b(n)
>> }
>>
>> or
>>
>> "&.selector" <- function(a, b) {
>> function(n) intersect(a(n), b(n))
>> }
>>
>> depending on whether selectors return logical or numeric v
Have a look at this
http://thread.gmane.org/gmane.comp.lang.r.general/87014/focus=133050
it is safer to have all you packages reinstalled once you have updated R.
HTH.
On Fri, 12 Dec 2008 18:47:33 +0100, Roy Robertson
wrote:
After installing a new version of R, how do I make the packages th
Dear Michael,
You haven't told us what your data is, and we can only surmise -- not very
helpful for you and annoying for those who try to help.
Apologies, I am brand new to R and this mailing list. Will try to be more
concise.
Here is my data a NEW verion of my data:
Curvature Diameter Qu
On 12/12/2008 1:06 PM, hadley wickham wrote:
Oh yes, that's a good point. But wouldn't the following do the job?
"&.selector" <- function(a, b) {
function(n) a(n) & b(n)
}
or
"&.selector" <- function(a, b) {
function(n) intersect(a(n), b(n))
}
depending on whether selectors return logical
> evens() & last(5)
wouldn't x[evens()][last(5)] do the & already?
or is different, though.
Claudia
--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste
phone: +39 (0 40) 5 58-34 47
email: cbelei...@un
Roy Robertson wrote:
> After installing a new version of R, how do I make the packages that I
> have already installed and use on the old version available to the new
> version?
Here is my solution. It has worked over many releases of R,
though it will probably require one initial re-installat
That depends on what you want evens() & last(5) to mean. Does that mean the
last 5 evens (returning 5 values) or the values in the last 5 that are also
even items (returning either 2 or 3 values depending on if the structure has an
odd or even number of elements). It could be interpreted eithe
Hello,
I am trying to do a loop with dates, but when I try to use the index is not
a date.
Fcorte <- as.Date('2008/11/30',format = "%Y/%m/%d")
fini <- Fcorte + 1
ffin <- seq(fini,by='months',length=2)[2] - 1
for (i in seq(fini,to = ffin, by='days'))
print (weekdays(i)) # i does
> My end would be the output of your end(). If there are no args and no local
> context, I don't see the need for it to be a function call. It would just
> be defined as something like
>
> end <- structure( function(n) c(rep(FALSE, n-1), TRUE), class="selector")
Oh, I see what you mean.
> I'm n
Try this:
weekdays(seq(fini,to = ffin, by='days'))
or in a loop:
sapply(as.character(seq(fini,to = ffin, by='days')),
function(d)weekdays(as.Date(d)))
On Fri, Dec 12, 2008 at 4:55 PM, Fernando Bizuet wrote:
> Hello,
>
> I am trying to do a loop with dates, but when I try to use the inde
Try iterating over the index rather than the value of
each component:
s <- seq(fini,to = ffin, by='days')
for (i in seq_along(s)) print(s[[i]])
On Fri, Dec 12, 2008 at 1:55 PM, Fernando Bizuet wrote:
> Hello,
>
> I am trying to do a loop with dates, but when I try to use the index is not
> a da
Ok, I knew somebody come with regex solution. My regex skills are limited
so I do not use it very often.
Regards
Petr
r-help-boun...@r-project.org napsal dne 12.12.2008 17:03:38:
> On Fri, Dec 12, 2008 at 11:00 AM, Petr PIKAL
wrote:
> > Hi
> >
> >
> > r-help-boun...@r-project.org napsal dne 1
Hi everybody,
I would like to estimate prevalence ratio and confidence intervals.
I tried to do a log-binomial regression, but there was a failure of
convergence.
Now, I would like to learn how to do a poisson regression with robust
variance.
I am trying to estimate coefficients with poisson r
You have not told us your OS (despite the posting guide).
For Windows this is covered in the rw-FAQ. Similar advice would apply on
a Unix-alike.
For Mac OS X, see the recent archives of the R-sig-mac list. E.g. the
strangely titled threads (look in a threaded view) around
https://stat.ethz
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Fernando Bizuet
> Sent: Friday, December 12, 2008 12:55 PM
> To: r-help@r-project.org
> Subject: [R] loop with dates
>
> Hello,
>
> I am trying to do a loop with dates, but w
Thanks Jorge,
I am aware of the method you suggest, however, it's not quite what I was
asking for.
I was attempting to do this change on 56 dataframes, so I attempted to
do so with a list of all rather than each individually.
Thanks, DaveT.
From: Jorg
John M. Chambers Statistical Software Award - 2009
Statistical Computing Section
American Statistical Association
The Statistical Computing Section of the American Statistical
Association announces the competition for the John M. Chambers
Statistical Software Award. In 1998 the Association for Co
On Fri, 12 Dec 2008 18:27:02 +0100, hadley wickham wrote:
or may be just
mtcars[cyl>3&last(20)]
or this is already too far?
This would be a considerable extension because then the selector would
need to know about all other variables in the dataset, and you'd need
someway of combining selec
Hi Sebpe,
the analysis of the data that you describe could be a complex and
lengthy process, in which decisions that you are confronted by are
affected by previous decisions that you have made. I recommend
obtaining the assistance of a statistician, preferably a local one
whose door you can knock
I am using R as a data manipulation tool for a SQL database. So in some of
my R scripts I use the RODBC package to retreive data, then run analysis,
and use the sqlSave function in the RODBC package to store the results in a
database.
There are two problems I want to avoid, and they are highly re
Hello List and thanks in advance for all of your help,
I am trying implement a permutation test of a multinomial logistic
regression ('multinom' within the nnet package). In the end I want to
compare the parameter estimate from my data to the distribution of
randomized parameter estimates.
I ha
Hi Ista,
one way could be:
ncharacters<-unlist(lapply(x,function(x)nchar(gsub(' ','',x
ncharacters
From: Ista Zahn
To: r-help@r-project.org
Sent: Friday, December 12, 2008 10:31:10 AM
Subject: [R] character count
Dear list,
I have a variable that consists
1 - 100 of 130 matches
Mail list logo