Try this:
lapply(a,function(x) apply(x[,-c(1,2)],2,quantile,probs=0.95))
# a is your example list
At 2014-08-05 09:17:23, "Zilefac Elvis" wrote:
>Hello,
>I would like to calculate for each numeric column in a dataframe,
>quantile(x,probs=o.95).
>My list object has 120 dataframes, each dataframe h
Hello,
I would like to calculate for each numeric column in a dataframe,
quantile(x,probs=o.95).
My list object has 120 dataframes, each dataframe has 102 columns.
Here is an example as well as a reproducible example:
[[120]]
Year Site Sim001 Sim002 Sim003 Sim004 Sim005 Sim006 Sim007 Sim008 Si
Dear R-users
i need your help to solve my problem in the code below, i want to simulate
two different samples R1 and R2 and each sample has 10 variables and 1000
observations so i want to simulate a data with high correlation between
var. in R1 and also in R2 and no correlation between R1 and R2 a
Spencer Graves structuremonitoring.com> writes:
>
> Hi, Jim et al.:
>
>Thanks for the reply, Jim.
>
>What are your favorite examples using normal probability plots to
> identify outliers, skewness, kurtosis, mixtures, and the need for
> transformations in plots of raw data an
here is another way of doing it using 'tidyr' and 'dplyr'
> x <- read.table(text = "CloneIDgenotype2001genotype2002
> genotype2003
+ 2471250111
+ 2471250000
+ 2433062000
+ 2433062111
+ 100021605110
+ 100021605101
On Mon, Aug 4, 2014 at 4:53 AM, raz wrote:
> Dear all,
>
> I have a data frame 144 x 2 values.
> I need to take every value in the first row and compare to the second row,
> and the same for rows 3-4 and 5-6 and so on.
> the output should be one line for each of the two row comparison.
> the c
Look at withCallngHandlers for another way to capture warnings. It
will let you attach warnings from an iteration of your function to the
output of the function so you can later track down the root cause of
the warning.
E.g., the attached captureWarningsAndMessagesWithContext attaches
warnings, m
Hi, Jim et al.:
Thanks for the reply, Jim.
What are your favorite examples using normal probability plots to
identify outliers, skewness, kurtosis, mixtures, and the need for
transformations in plots of raw data and residuals from model fits -- or
using half-normal plots with es
On Aug 4, 2014, at 9:24 AM, Luis Borda de Agua wrote:
> Dear David
>
> Thank you very much for your reply. I‚ve only seen it now.
> I tried length(warnings) and I got a strange result.
>
> When I used
>
> lw <- length(warnings)
> print(lw)
>
> I obtained lw=36
>
> however, the number of w
Great! Thanks, John.
For the eye sees not itself, but by reflection and someother things
On Sunday, August 3, 2014 4:54 PM, John McKown
wrote:
On Sun, Aug 3, 2014 at 5:12 PM, Zilefac Elvis wrote:
> Dear All,
> I have a List in R and would like to convert it to data.frame.
> Below is a reprod
Dear David
Thank you very much for your reply. Ive only seen it now.
I tried length(warnings) and I got a strange result.
When I used
lw <- length(warnings)
print(lw)
I obtained lw=36
however, the number of warnings was 38 according to message to screen:
"There were 38 warnings (use warni
Here is the solution using 'rle':
> require(data.table)
> x <- read.table(text = "CASE_ID YEAR_MTH ATT_1
+ CB26A201302 1
+ CB26A201302 0
+ CB26A201302 0
+ CB26A201303 1
+ CB26A201303 1
+ CB26A201304 0
+ CB26A201305
Or ?rle
Bert
Sent from my iPhone -- please excuse typos.
> On Aug 4, 2014, at 8:28 AM, jim holtman wrote:
>
> Try this, but I only get 2 changes for CB27A instead of you indicated 3:
>
>> require(data.table)
>> x <- read.table(text = "CASE_ID YEAR_MTH ATT_1
> + CB26A201302 1
> +
Try this, but I only get 2 changes for CB27A instead of you indicated 3:
> require(data.table)
> x <- read.table(text = "CASE_ID YEAR_MTH ATT_1
+ CB26A201302 1
+ CB26A201302 0
+ CB26A201302 0
+ CB26A201303 1
+ CB26A201303 1
+ CB26A201
On Mon, Aug 4, 2014 at 9:01 AM, Florian Denzinger
wrote:
> Hi John,
>
> I only meant the subsetting of the dataframe by using the zoo function
> suggested by Gerrit! Not a new solution/function, I am afraid.
> Regards,
> F
I take it that means you _don't_ have a solution. If not, or even if
you
Hello,
My name is Jenny Jiang and I am a Finance Honours research student from the
University of New South Wales Australia. Currently my research project involves
the calculating of some network centrality measures in R, which are degree,
closeness, betweenness and eigen vector. However I am ha
Hi John,
I only meant the subsetting of the dataframe by using the zoo function
suggested by Gerrit! Not a new solution/function, I am afraid.
Regards,
F
Am 04.08.2014 um 14:13 schrieb John McKown :
> On Mon, Aug 4, 2014 at 6:34 AM, Florian Denzinger
> wrote:
>> Shortly after answering to you
On Mon, Aug 4, 2014 at 6:34 AM, Florian Denzinger
wrote:
> Shortly after answering to your first email, I got to solution. Sorry for the
> unnecessary noise.
>
> Regards,
> F
>
Florian,
I'd be interested in seeing your solution. I need as many techniques
in my "bag of tricks" as I can find.
--
Sorry for spamish message but here is the error log of CORElearn failure:
*** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
corruption: 0x4b9b0788 ***
=== Backtrace: =
/lib64/libc.so.6[0x394b67d012]
/lib64/libc.so.6(__libc_malloc+0x63)[0x394b67f493]
/lib64/
You could try data.table
#dat is the dataset
library(data.table)
v1 <- setNames(c("HT", "A", "B", "Aht", "Bht"), c("11", "10", "01", "1-", "-1"))
dat2 <- setDT(dat1)[, lapply(.SD, function(x) v1[paste(x, collapse="")]),
by=CloneID]
A.K.
On Monday, August 4, 2014 5:55 AM, raz wrote:
Dear a
Shortly after answering to your first email, I got to solution. Sorry for the
unnecessary noise.
Regards,
F
Am 04.08.2014 um 12:00 schrieb Gerrit Eichner
:
> On Mon, 4 Aug 2014, Florian Denzinger wrote:
>
>> this is great, thanks!
>>
>> one problem I noticed though is that it fills all NA va
Hello, Raz,
if X is the data frame that contains your data, then using sort of an
"indexing trick" to circumvent your numerous if-statements as in
aggregate( X[ c( "genotype 2001", "genotype 2002", "genotype 2003")],
X[ "CloneID"],
FUN = function( x)
c(
On Mon, 4 Aug 2014, Florian Denzinger wrote:
this is great, thanks!
one problem I noticed though is that it fills all NA values in every
column, is it possible to specify only one column, e.g. only ID (I have
NA values in another column I want to keep)
Yes, of course. Just access only one c
Dear all,
I have a data frame 144 x 2 values.
I need to take every value in the first row and compare to the second row,
and the same for rows 3-4 and 5-6 and so on.
the output should be one line for each of the two row comparison.
the comparison is:
if row1==1 and row2==1 <-'HT'
if row1==1 an
this is great, thanks!
one problem I noticed though is that it fills all NA values in every column, is
it possible to specify only one column, e.g. only ID (I have NA values in
another column I want to keep)
Kind regards,
Florian
Am 04.08.2014 um 11:31 schrieb Gerrit Eichner
:
> Hello, F
Hello, Florian,
function na.locf() from package zoo mightdo what you want.
Hth -- Gerrit
-
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Gie
I have the following .csv file containing about 4 values (here only an
extract and simplified version):
NAME ; YEAR; ID; VALUE; CUMMB
Sample1;1998;354; 45;45
Sample1;1999;354; 23;68
Sample1;2000;NA;66;134
Sample1;
The CORElearn crashed when I used a test file of 100MB for the analysis.
However, it was difficult to send this big file to the developer, so I sent
a smaller test file ( ~40MB) to the developer. With this file, the
CORElearn did not crash.
So, now I am now running the code with the same (~40MB) t
On 04/08/2014 08:48, cosmos science wrote:
HI...
I am using R-package CORElearn (
http://cran.r-project.org/web/packages/CORElearn/index.html).
During its application on a dataset, It crashed. The crash message says
*** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
corrupti
HI...
I am using R-package CORElearn (
http://cran.r-project.org/web/packages/CORElearn/index.html).
During its application on a dataset, It crashed. The crash message says
*** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
corruption: 0x4b9b0788 ***
The error log "cd
30 matches
Mail list logo