Hello, Luca,
also a happy new year!
It's not quite clear to me what you want to do, but note first that the
":"-operator is a short-cut for seq() with by = 1 (look at ?seq), and that
it usually (!) does not work on columns of data frames. Exception: when
used for the argument subset of functi
On 01/02/2014 05:17 PM, Luca Meyer wrote:
Happy new year fellows,
I am trying to do something I believe should be fairly straightforward but
I cannot find my way out.
My dataset d2 is 26 rows by 245 columns, exclusively char variables. I
would like to check whether at least one column from V13
Hi All,
I have a terrible issue i cant seem to debug which is halting my work
completely. I have R 3.02 installed on a linux machine (arch linux-latest)
which I built specifically for running high memory use models. the system
is a 16 core, 256 GB RAM machine. it worked well at the start but in th
Happy new year fellows,
I am trying to do something I believe should be fairly straightforward but
I cannot find my way out.
My dataset d2 is 26 rows by 245 columns, exclusively char variables. I
would like to check whether at least one column from V13 till V239 (they
are in numerical sequence) h
You have to set the same seed before each random number generation!
You did not do this.
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Wed, Jan 1, 2014 at 2:1
If you want to reproduce the same sequence twice, then you need to set the seed
at the beginning of each calculation. You are only doing it for the second
calculation below.
---
Jeff NewmillerThe .
Hello,
Inline.
Em 01-01-2014 22:12, Chee Chen escreveu:
Dear All,
I would like to ask for your help on "reproducibility of random sampling with
replacement". For example, one re-samples the rows with replacement of a residual
matrix and uses the new residual matrix thus obtained to produce a
Why on earth would you expect S and T to be the same given
what you have done. "I am unable to rightly apprehend the
confusion of ideas that could provoke such a question",
(Charles Babbage).
You have to set the *same* seed before each construction.
I.e. do set.seed(123) before creating S; then
Dear All,
I would like to ask for your help on "reproducibility of random sampling with
replacement". For example, one re-samples the rows with replacement of a
residual matrix and uses the new residual matrix thus obtained to produce a
statistic ; repeat this for a certain number of times.
My
Hi,
May be this helps:
Using your function:
mapply(less,test,4)
#or
invisible(mapply(less,test,4))
#[1] 2 3
#[1] 3
#or
for(i in 1:ncol(test)){
less(test[,i],4)}
#[1] 2 3
#[1] 3
A.K.
Hi, I'm trying to figure out how to loop through columns in a matrix or
data frame, but what I've been f
> 2. However, Bill (and Henrik) raised the question of replacing '1' with
> '1L'; I understand the meaning of that, but does it matter (in practice)?
> On 12/22/2013 06:57 PM, William Dunlap wrote:
> >>> for (i in seq_len(x - 1) + 1)
> >>>
> >>> should be efficient and safe.
> >>
> >> Oops, not sa
Hi,
You could try:
df3 <- df1
library(plyr)
df3[,-1] <- ddply(df1,.(Nom1=gsub("\\d+","",Nom)),colwise(function(x)
rep(max(x),length(x[,-1]
attr(df3,"row.names") <- attr(df2,"row.names")
identical(df2,df3)
#[1] TRUE
A.K.
On Wednesday, January 1, 2014 11:56 AM, Arnaud Michel
wrote:
Dea
Hello,
Here's one way.
lst1 <- lapply(split(df1, gsub("[0-9]", "", df1$Nom)), function(x){
x[, -1] <- lapply(x[, -1], function(y){
z <- if(any(y == 1)) 1 else 0
rep(z, length(y))
})
x
})
df3
1. Thank you for the clear reproducible example. This made it easy to
see what you wanted and provide an answer. Hopefully a correct one!
2. Many ways to do this. Here's one, but others may be better.
Step1: First greate a grouping factor for Nom to group the separate
row labels into the logical
Dear All,
From the dataframe df1
df1 <-
structure(list(Nom = structure(1:9, .Label = c("A1", "A2", "A3",
"B1", "B2", "C1", "C2", "C3", "C4"), class = "factor"), Pays1 = c(1,
1, 0, 0, 1, 0, 0, 0, 0), Pays2 = c(0, 0, 0, 1, 1, 0, 1, 0, 1),
Pays3 = c(0, 0, 0, 0, 1, 0, 0, 0, 0), Pays4 = c(1, 0, 0
Dear R-users,
Happy new year to all!
I have been using the mgcv package, and I have run some models using the
option mrf, for saptial data. But I have found quite hard to interpret the
results. I could not find a lot of documentation on that, examples and so
on, so I was wondering if anyone can h
HI,
Another way would be to use ?substitute()
hist(runif(1000,0,100),xlab=substitute(expression(AUC[low - high]~
(xyz)),list(low=low,high=high)),ylab="Frequency")
A.K.
On Wednesday, January 1, 2014 10:36 AM, arun wrote:
Hi,May be this helps:
hist(runif(1000,0,100),xlab=bquote(AUC[.(low) -
Hi,May be this helps:
hist(runif(1000,0,100),xlab=bquote(AUC[.(low) - .(high)]~
(xyz)),ylab="Frequency")
A.K.
On Wednesday, January 1, 2014 10:30 AM, Andras Farkas
wrote:
Dear All,
Happy new year!
wonder if you could help with the following:
we have:
hist(runif(1000,0,100),xlab=express
Dear All,
Happy new year!
wonder if you could help with the following:
we have:
hist(runif(1000,0,100),xlab=expression(AUC[0 - 24]~ (xyz)),ylab="Frequency")
the plan is to have part of the xlab expression change dynamically,
specifically the values of 0 and 24 should be able to update 'autom
This is an unstable process. I suggest using the bootstrap to get a
confidence interval for the rank of each correlation coefficient among all
non-diagonal correlations.
-
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context:
http://r.789695.n4.n
On Wed, Jan 1, 2014 at 4:36 AM, David Parkhurst wrote:
> Thanks to the three people who saw what I missed. I typed my
> code in Libre Office as "<" followed by "-", and that program
> converted those two characters into a single left arrow symbol.
> I copied the commands from Libre into R without
Thanks to the three people who saw what I missed. I typed my
code in Libre Office as "<" followed by "-", and that program
converted those two characters into a single left arrow symbol.
I copied the commands from Libre into R without noticing that
that had happened. Wierd.
On 12/31/2013 7:54 P
22 matches
Mail list logo