Displaying 20 results from an estimated 10000 matches similar to: "Merging tables"
2009 Sep 25
7
Spliting columns, strings or reg exp returning substrings
Currently as the first column in a data frame I have string values in the format xx_yy - I want to create a new column with just the substring xx (for each row in turn). Three possible ways to do this might be (1) split the string by '_' using strsplit and paste the first of the resulting variables into a new column, but I have been unable to do this for each row of my data frame in turn
2009 Jul 28
2
aggregating strings
I am currently summarising a data set by collapsing data based on common identifiers in a column. I am using the 'aggregate' function to summarise numeric columns, i.e. "aggregate(dat[,3], list(dat$gene), mean)". I also wish to summarise text columns e.g. by concatenating values in a comma separated list, but the aggregate function can only return scalar values and so something
2010 Sep 23
1
merging multiple data frames
hi guys
i have multiple data frames which i want to merge.
there are four of them..eg
pdf
SampleID UVDose_J RepairHours Day_0 Day_45 Day_90
1 SDM001 1.0 3 485.612 465.142 490.873
2 SDM001 1.0 3 503.658 457.863 487.783
3 SDM001 1.0 2 533.193 451.044 456.973
4 SDM001 1.0 2 538.334 452.887 474.915
5 SDM001 1.0
2012 Jun 28
1
Merging listed dataset into one
Hello,
I'm wondering how I can merge two featuresets into one.
My dataset is two sets of microarray data and it looks like followings:
> rawData
$v1
TilingFeatureSet (storageMode: lockedEnvironment)
assayData: 2197815 features, 59 samples
element names: channel1, channel2
protocolData
rowNames: LT290677RU_D1_2011-02-16 LT286300LU_D1_2010-07-24 ...
LT003990RU_D1_2010-11-04 (59
2010 Dec 09
4
lapply getting names of the list
Hello All,
I have a toy dataframe like this. It has 8 columns separated by tab.
Name SampleID Al1 Al2 X Y R Th
rs191191 A1 A B 0.999 0.09 0.78 0.090
abc928291 A1 B J 0.3838 0.3839 0.028 0.888
abcnab A1 H K 0.3939 0.939 0.3939 0.77
rx82922 B1 J K 0.3838 0.393
2010 May 16
2
sample
Hi,
I am sampling two random columns from females and two random columns
from males to produce tetraploid offspring. For every female I am
sampling a random male.
In the end I want to write out a a matrix with all the offspring, but
that does not work. I get always only the offspring from the last
females. There must be a mistake in my script:
moms<-read.delim("females.txt",
2013 May 01
1
Combine multiple tables into one
Hi,
May be this helps:
dat1<- as.data.frame(table1)
?dat2<- as.data.frame(table2)
names(dat2)<-c("V3","V4")
library(plyr)
res<-join(dat1,dat2,type="full")
?res[is.na(res)]<- 0
?res
#? V1 V2 V3 V4
#1? 1? 1? 0? 0
#2? 1? 2? 0? 0
#3? 0? 0? 0? 1
#4? 0? 0? 0? 4
?combinedtable<-as.matrix(res)
?colnames(combinedtable)<- NULL
?combinedtable
#???? [,1] [,2]
2010 Oct 26
3
Reading in a tab delimitated file
Hi all,
I have a total newbie question, but I could really use some help.
I need to read in this file:
SampleID Disease
E-CBIL-28-raw-cel-1435145228.cel 1
E-CBIL-28-raw-cel-1435145451.cel 2
E-CBIL-28-raw-cel-1435145479.cel 2
E-CBIL-28-raw-cel-1435145132.cel 3
E-CBIL-28-raw-cel-1435145417.cel 3
E-CBIL-28-raw-cel-1435145301.cel 2
E-CBIL-28-raw-cel-1435145558.cel 1
2012 Jan 10
2
strange Sys.Date() side effect
Any ideas what is the problem with this code?
> N <- 2; c(Sys.Date(), sprintf('N = %d', N))
[1] "2012-01-10" NA
Warning message:
In as.POSIXlt.Date(x) : NAs introduced by coercion
Best regards,
Ryszard
Ryszard Czerminski
AstraZeneca Pharmaceuticals LP
35 Gatehouse Drive
Waltham, MA 02451
USA
781-839-4304
ryszard.czerminski@astrazeneca.com
2011 Nov 23
2
bizarre seq() behavior?
Is there any rational explanation for the bizarre seq() behavior below?
> seq(2,8.1, lenght.out=3)
[1] 2 3 4 5 6 7 8
> help(seq)
> seq(2,8,length.out=3)
[1] 2 5 8
> seq(2,8.1,length.out=3)
[1] 2.00 5.05 8.10
Except maybe that it is early in the morning :)
Best regards,
Ryszard
Ryszard Czerminski
AstraZeneca Pharmaceuticals LP
35 Gatehouse Drive
Waltham, MA 02451
USA
781-839-4304
2012 Jan 12
3
strsplit() does not split on "."?
Any ideas what is wrong?
> strsplit("a.b", ".") # generates empty strings with split="."
[[1]]
[1] "" "" ""
> strsplit("a b", " ") # seems to work fine with split=" ", and other
characters...
[[1]]
[1] "a" "b"
>
> R.Version()
$platform
[1]
2010 Sep 27
1
smooth contour lines
Is there an easy way to control smoothness of the contour lines?
In the plot I am working on due to the undersampling the contour
lines I am getting are jugged, but it is clear "by eye" these should
be basically straight lines.
In maps package I found smooth.map function, but maybe there is a more
generic way
of accomplishing the same thing.
Ideally there would be an option to control
2012 Jan 25
1
Error in predict.randomForest ... subscript out of bounds with NULL name in X
RF trains fine with X, but fails on prediction
> library(randomForest)
> chirps <-
c(20,16.0,19.8,18.4,17.1,15.5,14.7,17.1,15.4,16.2,15,17.2,16,17,14.1)
> temp <-
c(88.6,71.6,93.3,84.3,80.6,75.2,69.7,82,69.4,83.3,78.6,82.6,80.6,83.5,76
.3)
> X <- cbind(1,chirps)
> rf <- randomForest(X, temp)
> yp <- predict(rf, X)
Error in predict.randomForest(rf, X) : subscript
2010 Sep 14
3
how to compute when row length is different
hi guys..please help me with this
i am working on two data frames
one goes like this:
DF1
Sample_id RepairHours Denatured Dose ZeroMean FourtyFiveMean NinetyMean
1 SDM071 0 1 B 60.5 19.0 45.0
2 SDM071 1 1 B 46.0 23.0 42.5
3 SDM071 2 1 B 52.5 24.0 40.0
4 SDM071
2001 Feb 07
5
zero inflated poisson and censored-continuous models
I wonder if there is a package that will estimate a Zero Inflated Poisson
Model (ZIP), and also if there is a package that will estimate what is
called the Tobit model: that is a combination of censored and observed
values in the same sample.
Georgina Bermann
Biostatistics
AstraZeneca R&D M?lndal
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing
2011 Jan 20
1
randomForest: too many elements specified?
I getting "Error in matrix(0, n, n) : too many elements specified"
while building randomForest model, which looks like memory allocation
error.
Software versions are: randomForest 4.5-25, R version 2.7.1
Dataset is big (~90K rows, ~200 columns), but this is on a big machine (
~120G RAM)
and I call randomForest like this: randomForest(x,y)
i.e. in supervised mode and not requesting
2002 Oct 30
2
Problems joining a Samba PDC controlled Domain
Hello,
I'm having problems to join a japanese W2K Client with
SrvPck 2 installed to my samba 2.2.5 PDC controlled
domain.
Other Clients are no problem (Win98, W2k engl., WXP german).
I check the regKey (for plaintextpassword; set to 1).
Reinstalled SevPck 2, but didn't help. the problem must be
on Client side because I having the same problem when
jooining a other samba controlled
2002 Oct 23
1
SAMBA and Win2000 SP3
We are presenty using SAMBA 2.2 w. Windows 2000 sp1 and will be upgrading
to Windows 2000 sp3.
Are there any known or suspected problems with the combination of Windows
2000 sp3 and SAMBA 2.2.
We are using Solaris 7 on the Unix side.
/ola
Ola Engstr?m
Technical Computing & Information Services
AstraZeneca R&D M?lndal
S-431 83 M?lndal Sweden
2004 Feb 17
10
How to write efficient R code
I have been lurking in this list a while and searching in the archives to
find out how one learns to write fast R code. One solution seems to be to
write part of the code not in R but in C. However after finding a benchmark
article (http://www.sciviews.org/other/benchmark.htm) I have been more
interested in making the R code itself more efficient. I would like to find
more info about this. I have
2000 Jan 05
1
Upgrade to 2.0.6 not working
Hi All,
We have been running samba-1.9.18p10 beautifully for the past
year or so. Finally decided to upgrade to samba-2.0.6 and am
having no luck. We are using security=server such that the
users are using their NT login/password to authenticate. When
I test the 2.0.6 installation with smbclient, I get the
"protocol negotiation failure" message. Does anyone know what
this means? I