search for: kjaja27

Displaying 20 results from an estimated 39 matches for "kjaja27".

2008 Jun 04
4
merging 3 data sets at once
Hi All, I am looking into merging 3 data sets I know how to do that by merging data1 with data2 and then merging the result with data 3. I was wondering if it can be done all at once so I tried, M<-merge(data1,data2,data3, by=?ID?) It does not work! Any ideas? -- View this message in context: http://www.nabble.com/merging-3-data-sets-at-once-tp17658873p17658873.html Sent from the R help
2008 Jun 03
2
merge two data sets
I would like to merge ?data1 ?that contains 100 unique ID?s with another data set ?data 2? with 150 ID?s and the age of those individuals ( the ID in data1 is a subset of the ID in data 2) I would like to merge these data1 with data2 and have the result of the merge to have the ID ordered as in data1. Can this be done in R? -- View this message in context:
2009 Dec 17
3
write.csv and col.names=F
Hi All, I always have a problem with write.csv when I want the column names to be ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc. for example I tried write.csv(mydata, file="data.csv", quote=FALSE, row.names=F, col.names=F) Warning message: In write.csv(mydata, file = "data.csv", quote = FALSE, : attempt to set 'col.names' ignored >
2009 Feb 10
7
How to split a character vector into 3 vectors
Hi , Does any one know how to split a character vector , I have a vector X that looks like this and each row has 3 characters X ASK DGH ASG AUJ FRT I would like to split the vector into 3 vectors that look like this X1 X2 X3 A S K D G H A S G A U J U R T thanks -- View this message in context: http://www.nabble.com/How-to-split-a-character-vector-into-3-vectors-tp21939492p21939492.html
2009 Feb 10
7
ifelse()
I have a problem with ifelse(), I do not understand how it works. > X<-c(2,2,1,1,0,0) > str(X) num [1:6] 2 2 1 1 0 0 > Y<-ifelse(X>0,1,0) > Y [1] 1 1 1 1 0 0 > Can some one explain what is going on, I do not understand what ifelse is doing in this case. Can someone explain the output Y. Thanks -- View this message in context:
2009 Jan 07
3
breaking a loop in R
Hi All, I was wondering if there is anything that breaks a loop in R. For example, For (k in 1:100) For ( i in 1:10){ If ( condition ){ Break the inner loop } } } In the above case, if the program runs the if statement, then I want the inner loop for (i in 1:10) to stop looping and skip the rest of the program. Thanks for your help -- View this message in context:
2010 Jan 19
3
problem with the precision of numbers
Hi All, I was wodering if it is possible to increase the precision using R. I ran the script below in R and MAPLE and I got different results when k is large. Any idea how to fix this problem? thanks for your help for (k in 0:2000){ s=0 for(i in 0:k){ s=s+((-1)^i)*3456*(1+i*1/2000)^3000 } } -- View this message in context:
2009 May 27
2
problem with cbind
Hi All, I have a file with two columns, the first column has the names of the patients and the second column has the age. I am looking into creating an output file that looks like 1-10 10-20 etc Eric Chris Bob mat Andrew Suzan Where each column has the name of the patients in a given age category that is displayed in the header. For example in the output, the first
2010 Jul 29
3
help splitting a data frame
Hi All, I have a dataset that I would like to split based on : or ? ( the data file is tab delimited) for example: Ny:23-45 AC BA:88-91 DB KJ:21-13 PA And I would like the data to be splitted and the final results look like NY 23 45 AC BA 88 91 DB KJ 21 13 PA I would like to have the resulting data as a data frame so each column is a variable. Thanks, -- View this message in context:
2010 Feb 26
6
using grep
Hi All, I have a character vector with naems of cities in the us. I need to extract the number that appear after the word "New York", for example, x<-c("P Los Angeles44AZ", "P New York722AZ", "K New York20") I want the results to be 722, 20 cab I use the grep function, if so how? I appreciate your help, thanks, -- View this message in context:
2008 Apr 10
2
subtract the mean from each column
Hi, I am new to R an dI need some help I have a matrix of real values 100*300 and I would like to calculate the mean for each column , then for each entry in a column i need to subtract the mean so I will have a matrix where the columns have zero mean. any one know how to do that . Thanks -- View this message in context:
2008 Jun 02
2
merging two data sets with no column header
I have two data sets data1 and data2 with no column names( No header). The first coluimn in both data sets represents the case ID. How can I tell R to merge the two data sets by the case ID if there is no header? Also, In data1 I have more cases and I would like the result of the merge to have all the cases in both data1 and data2. there may be some duplicate cases. I appreciate if someone can
2008 Oct 03
1
Splitting a file into multiple files based on the column name
Hi, I have a txt file here I want to split it into different files based on the column name if it contains a specific word or part of a word. For example, If the header looks like A001_Sick A015_SB K99_Sick L913_BB I would like to split the data , one file contains the data with column names containing the words ?Sick? or ?SB? and have the rest of the data in another file. I
2008 Oct 03
1
merge
Hi All, I want to merge file 2 into file 1 , is it possible to get the rows from file 2 that did not end up in the merge result? Thanks -- View this message in context: http://www.nabble.com/merge-tp19805328p19805328.html Sent from the R help mailing list archive at Nabble.com.
2008 Oct 03
1
font color
Hi , I was wondering if we can color the font in R ? thanks -- View this message in context: http://www.nabble.com/font-color-tp19807473p19807473.html Sent from the R help mailing list archive at Nabble.com.
2009 Mar 05
1
ANOVA
Hi All, I have about one hundred patients and all the patients had their glucose measured on three different days. The days are all the same for all he patients. So I have three measurement for each patient . I want to know whether the day when the glucose was measured has an effect on the measurements. I was thinking to use a single factor analysis of variance but I am not sure how to do it in
2009 Mar 05
1
missings
I have a file where the missings are coded as NA or blank. how can I tell R to read the data set and to consider the missings NA or a blank. I tried the following data<-read.table("data.txt", sep='\t', header=T, na.strings=c("NA","")) is it correct? I am new to R and I am not sure if R is condisering the blanks as missings in the above. Thanks for the
2009 Oct 06
2
How to extract names from a vector
Hi All, I have a character vector of length=700. The vector contains names and I want to extract the names that contain the number 101. The number 101 could be anywhere within the name. what is the best way to do this? -- View this message in context: http://www.nabble.com/How-to-extract-names-from-a-vector-tp25773482p25773482.html Sent from the R help mailing list archive at Nabble.com.
2010 Dec 06
1
getting the exact p value
I was wondering if there is a way to get an exact p-value at times where R gives me just a range . for example t.test(x,y) p-value < 2.2e-16 thanks, -- View this message in context: http://r.789695.n4.nabble.com/getting-the-exact-p-value-tp3075107p3075107.html Sent from the R help mailing list archive at Nabble.com.
2008 Aug 22
1
problem with rbind
I am trying to use rbind to have the two data on the top of each other but I am getting an extra X on the column header and the rows are numberd , How to get rid of this problem? I appreciate your help x1<- read.table(file="data1.txt", header=T, sep="\t") x2<-read.table(file="data2.txt", header=T, sep="\t") y<-rbind(x1,x2) > y X0