Displaying 20 results from an estimated 200 matches similar to: "correlation help"
2009 Mar 13
2
Taking diff of character vectors
Hello, everybody
Say I have
nm1 <- c(rep(1,10), rep(0,10))
then I can do:
diff(nm1)
to see where I have shift in value
but what if I have
nm2 <- c(rep("SPZ8", 10), rep("SPX9", 10))
how can I produce the same ouput as diff(nm1) does, that is zeros
everywhere except for one place where SPZ8 changes to SPX9 (there
should be 1 there)?
What if I have a matrix of characters
2011 Oct 17
1
plotting issues with PCA
Hi Listers,
This has a simple answer but it has been eluding me nonetheless.
I have been building a PCA plot from scratch with the ability to plot
predefined groups in different colors. This has worked fine but when I try
to get a polygon drawn around each of the groups it is not recognising my
colour file correctly and is only printing the first colour in the
file....code is below
2007 Mar 09
1
lpSolve space problem in R 2.4.1 on Windows XP
Hi.
I am trying to use the linear optimizer from package lpSolve in R 2.4.1 on
Windows XP (Version 5.1). The problem I am trying to solve has 2843
variables (2841 integer, 2 continuous) and 8524 constraints, and I have 2 Gb
of memory. After I load the input data into R, I have at most 1.5 Gb of
memory available. If I start the lp with significantly less memory
available (say 1 Gb), I get
2007 Jul 12
1
sub-function default arguments
Hi.
I have defined a function, f1, that calls another function, f2. Inside f1
an intermediate variable called nm1 is created; it is a matrix. f2 takes a
matrix argument, and I defined f2 (schematically) as follows:
f2<-function(nmArg1=nm1,...){nC<-ncol(nmArg1); ... }
so that it expects nm1 as the default value of its argument. f1 is defined
(schematically) as:
2004 Dec 17
1
reshape and split
Dear R-users,
I am trying to reshape the DF "dat2" in the "long" format,
but can't figure out how to use the "split"-option:
> dat2
a.1995.z b.1995.z a.1996.z var
1 100.00000 100.00000 100.00000 Neue Anlagen insgesamt
2 40.09904 23.60890 40.88960 Neue Ausr??stungen
3 59.90096 76.39110 59.11040 Neue Bauten
This
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello,
colnames seems to be not optimized well for data.frame. It escapes
processing for data.frame in
if (is.data.frame(x) && do.NULL)
return(names(x))
but only when do.NULL true. This makes huge difference when do.NULL
false. Minimal edit to `colnames`:
if (is.data.frame(x)) {
nm <- names(x)
if (do.NULL || !is.null(nm))
return(nm)
else
2002 Nov 15
2
Why no colSDs etc
Hi people,
If there is a fn "colMeans" why isn't there a "colSDs" etc
Thanks,
Phil.
--
Philip Rhoades
Pricom Pty Limited (ACN 003 252 275)
GPO Box 3411
Sydney NSW 2001
Australia
Mobile: +61:0411-185-652
Fax: +61:2:8923-5363
E-mail: pri at chu.com.au
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2017 Aug 27
2
How to get CI from surfit object in survival
Dear Bert,
thank you for suggestion. I am aware of R-help function. I must
apologize, my earlier question could lead to assumptions otherwise.
As you can see below, I only get Std. error but not lower and Upper CIs.
I was wondering if there is another argument or method, could give CIs
which I cannot find anywhere.
Thanks
Adrian
> Nsurv <-
2013 Apr 03
2
Creating data frame from individual files
Dear Group:
I have 72 files (.txt).
Each file has 2 columns and column 1 is always identical for all 70 files.
Each file has 90,799 rows and is standard across all files.
I want to create a matrix 40(rows) x 70 columns.
I tried :
temp = list.files(pattern="*.txt")
named.list <- lapply(temp, read.delim)
library(data.table)
files.matrix <-rbindlist(named.list)
>
2009 Mar 14
1
multiple hypothesis testing
Dear all,
Myself Vijaykumar Muley working as senior research fellow. By training I am
a computational biologist with not a strong knowledge of statistics. I have
done some analysis which is explained as follows,
I have 10340 (X) profiles of binary vectors with same length(N=845), I will
call then "gene profiles"
for example...
v1 v2 v3 v4.....vN
a 1 0 1 0 1
b 0
2002 Aug 14
3
t-test via matrix operations
I need to calculate a large number of t statistics, and would like to do so via matrix operations. So far I have figured out a way to calculate the mean of each row of the matrix:
d <- matrix(runif(100000,1,10), 1000, 10) # some test data
s <- rep(1,ncol(d)) # a sum vector to use for matrix multiplication
means <- (d%*%s)/ncol(d)
This is at least 1 order of magnitude faster than
2017 Aug 27
0
How to get CI from surfit object in survival
Did you not notice the conf.type = "none" argument to your survfit
call and the associated documentation in the survfit help?
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Aug 26, 2017 at 5:18 PM, Adrian Johnson
2006 Mar 31
2
rowVars
I am using the R 2.2.1 in a Windows XP environment.
I have a dataframe with 12 columns and 1,000 rows.
(Some of the rows have 1 or fewer values.)
I am trying to use rowVars to calculate the variance
of each row.
I am getting the following message:
?Error in na.remove.default(x) : length of 'dimnames'
[1] not equal to array extent?
Is there a good work-around?
2017 Aug 26
2
How to get CI from surfit object in survival
Hi
I am not sure hiw to get thr CI from summary function on the survfit object.
I can get the percent survival for 2 years from survfit object but I dont
get Confidence intervals
Could anyone suggest a hint
Thanks
Adrian
[[alternative HTML version deleted]]
2002 Mar 17
5
compute variance of every column in a matrix without a loop
Is it possible to compute the variance of every column in a matrix
without a loop?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
2017 Aug 26
0
How to get CI from surfit object in survival
???
Both ?survit.object (linked in the see also section of ?survfit) and
?summary.survfit give you this information. Do you not know how to use
R's help faciities -- in which case you should learn them now; see
?help -- or have I misunderstood your query?
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
2017 Aug 03
1
test for proportion or concordance
Hello group,
my question is deciding what test would be appropriate for following question.
An experiment 'A' yielded 3200 observations of which 431 are
significant. Similarly, using same method, another experiment 'B' on a
different population yielded 2541 observations of which 260 are
significant.
There are 180 observations that are common between significant
observations of A
2012 May 18
1
help with creating a box plot
Hi:
I am looking for some help in making two boxplots next to each other.
I have a data like this:
N1 T1 N2 T2 N3 T3 N4 T4 ... Nn Tn
7 8.2 4 5 8 10 4 5 ..... 10 11
I want to have box plot for all Normal samples (N1,N2,N3,N4,,,,Nn)
and another box plot for all tumors (T1,T2,T3,T4,...Tn).
I have data in a numeric class.
If data is represented as N1
2009 Jun 23
1
plotting ROC from coefficient in the model
Hi everyone.
Probably this is statistical question rather than an R, but it involves
packages from R I am asking here since I am unable to find an answer. In the
parametric modeling packages like glmnet, lasso etc......., we are able to
obtain the coeffcients that have entered the model.
for eg in glmnet if we are working on a dataset containing 15 variables
the coeffecient parameters output
2009 Dec 09
4
binary string conversion to a vector (PR#14120)
Full_Name: Franc Brglez
Version: R 2.9.1 GUI 1.28 Tiger build 32-bit (5444)
OS: MacOSX -- 10.6.2
Submission from: (NULL) (24.148.163.114)
I am demonstrating what may be a bug or my lack of experience. Please review as
it would help to hear from someone.
MANY THANKS -- Franc Brglez
The function "binS2binV" returns what I consider a wrong value -- see the
terminal output
binS2binV =