Re: [R] read table and import of a text file

2013-10-19 Thread arun
Hi, No problem. dat1 <- subset(head(read.table("temp1.txt",skip=6,sep=",",header=FALSE,fill=TRUE,stringsAsFactors=FALSE),-1),select=1:4)  dat1$V1 <- as.numeric(dat1$V1)  str(dat1) #'data.frame':    96409 obs. of  4 variables: # $ V1: num  891231 900101 900101 900101 900101 ... # $ V2: int  2400

Re: [R] read table and import of a text file

2013-10-18 Thread arun
Hi, The code is based on what you pasted on the page. In the original post, you used sep="", while the pasted data shows "," as delimiter. dat1 <- subset(head(read.table(text="#Hogd/met, Temp, 005[M], Value #Hogd/met, Difftemp, 051[M], Value BA0+ 1 MTEMP005 1 [deg.C] 2 MDTMP051 1 [deg.C] EOH 8912

Re: [R] read table and import of a text file

2013-10-18 Thread arun
Hi, Assuming that you provided the sample data from the file. temp <- readLines(textConnection("#Hogd/met, Temp, 005[M], Value #Hogd/met, Difftemp, 051[M], Value BA0+ 1 MTEMP005 1 [deg.C] 2 MDTMP051 1 [deg.C] EOH 891231, 2400, -1.5, -0.21, 900101, 0100, -1.4, -0.25, 900101, 0200, -1.6, -0.28, 9001

Re: [R] read. table()

2012-12-08 Thread David Winsemius
uri, Pradip (SAMHSA/CBHSQ) Cc: David L Carlson; R help Subject: Re: [R] read. table() Hi, You can check the str() I assume it will be like this: str(read.delim(textConnection(Lines),header=TRUE,sep="\t")) #'data.frame':195 obs. of 1 variable: # $ raceage...percent..s

Re: [R] read. table()

2012-12-08 Thread arun
num  0.642 0.249 1.005 0.553 0.467 ... # $ flag_var : chr  "any" "any" "any" "any" ... A.K. - Original Message - From: David L Carlson To: 'arun' ; "'Muhuri, Pradip (SAMHSA/CBHSQ)'" Cc: 'R help' Sent

Re: [R] read. table()

2012-12-08 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
click on the following link to complete a brief customer survey: http://cbhsqsurvey.samhsa.gov -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Saturday, December 08, 2012 8:45 PM To: Muhuri, Pradip (SAMHSA/CBHSQ) Cc: dcarl...@tamu.edu; R help Subject: Re: [R] read

Re: [R] read. table()

2012-12-08 Thread arun
t;12-17" "12-17" ...  $ percent  : num  5.79 5.2 3.8 4.37 1.81 ...  $ sepercent: num  0.642 0.249 1.005 0.553 0.467 ...  $ flag_var : chr  "any" "any" "any" "any" ... A.K. - Original Message - From: "Muhuri, Pradip (SAMHSA/CB

Re: [R] read. table()

2012-12-08 Thread arun
5804  coc",..: 50 170 20 5 35 185 65 155 110 80 ... A.K.   - Original Message - From: "Muhuri, Pradip (SAMHSA/CBHSQ)" To: 'Prof Brian Ripley' ; "r-help@r-project.org" Cc: Sent: Saturday, December 8, 2012 5:05 PM Subject: Re: [R] read.

Re: [R] read. table()

2012-12-08 Thread David L Carlson
ny" "any" "any" "any" ... > -Original Message- > From: arun [mailto:smartpink...@yahoo.com] > Sent: Saturday, December 08, 2012 5:11 PM > To: Muhuri, Pradip (S

Re: [R] read. table()

2012-12-08 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Sent: Saturday, December 08, 2012 5:13 PM To: Muhuri, Pradip (SAMHSA/CBHSQ) Cc: David L Carlson; R help Subject: Re: [R] read. table() Hi, You can check the str() I assume it will be like this: str(read.delim(textConnection(Lines),header=TRUE,sep="\t")) #'data.frame':195 obs.

Re: [R] read. table()

2012-12-08 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Dear Prof Ripley, Your hint is helpful, and I see considerable improvements in the results. The only issue is that the column names do not seem to be correct. I did not understand part of your comment, which says "fortunes::fortune(14) applies" although I read about the double colon operator-

Re: [R] read table for Fisher Exact

2010-05-13 Thread Shi, Tao
Thanks, David! - Original Message > From: David Winsemius > To: Frank E Harrell Jr > Cc: "Shi, Tao" ; r-help@r-project.org > Sent: Thu, May 13, 2010 8:29:31 PM > Subject: Re: [R] read table for Fisher Exact > > On May 13, 2010, at 9:24 PM, Frank E H

Re: [R] read table for Fisher Exact

2010-05-13 Thread David Winsemius
age From: Frank E Harrell Jr To: r-help@r-project.org Sent: Thu, May 13, 2010 5:35:07 AM Subject: Re: [R] read table for Fisher Exact On 05/12/2010 03:31 PM, visser wrote: i have 2 groups i want to compare: group A and group B each group contains let's say 20 patients i want to perfo

Re: [R] read table for Fisher Exact

2010-05-13 Thread Frank E Harrell Jr
hu, May 13, 2010 5:35:07 AM Subject: Re: [R] read table for Fisher Exact On 05/12/2010 03:31 PM, visser wrote: i have 2 groups i want to compare: group A and group B each group contains let's say 20 patients i want to perform a Fisher Exact test on genotype distribution so, see if t

Re: [R] read table for Fisher Exact

2010-05-13 Thread Shi, Tao
Hi Prof. Harrell, Could you please elaborate on why chi-square test is more appropriate in this case? Thank you very much! ...Tao - Original Message > From: Frank E Harrell Jr > To: r-help@r-project.org > Sent: Thu, May 13, 2010 5:35:07 AM > Subject: Re: [R] re

Re: [R] read table for Fisher Exact

2010-05-13 Thread visser
How much would that differ? And how should I build my table if I want to do a Pearson Chi Sqaure? - Original Message - From: "Frank E Harrell Jr [via R]" Date: Thursday, May 13, 2010 2:36 pm Subject: Re: read table for Fisher Exact To: visser > On 05/12/2010 03:31 PM, visser wrote:

Re: [R] read table for Fisher Exact

2010-05-13 Thread Frank E Harrell Jr
On 05/12/2010 03:31 PM, visser wrote: i have 2 groups i want to compare: group A and group B each group contains let's say 20 patients i want to perform a Fisher Exact test on genotype distribution so, see if there is a sign diff in genotpe frequency/distribution (#AA, #AB, #BB) between group A

[R] read table for Fisher Exact

2010-05-13 Thread visser
i have 2 groups i want to compare: group A and group B each group contains let's say 20 patients i want to perform a Fisher Exact test on genotype distribution so, see if there is a sign diff in genotpe frequency/distribution (#AA, #AB, #BB) between group A and B not for 1, but for 1000 different

Re: [R] read table not reading lines containing single quotes

2008-04-09 Thread Philipp Pagel
On Wed, Apr 09, 2008 at 04:09:57PM -0400, Vidhu Choudhary wrote: > kegg<-read.table("c:/IDs.tab",header =TRUE,quote= "'", sep="\t") * > *It doesnot read from Alzheimer's disease. Due the single qoutes in it. You have almost given the answer yourself: you are declaring the single quote to be a q

[R] read table not reading lines containing single quotes

2008-04-09 Thread Vidhu Choudhary
Hi, * I am using read.table command as follow kegg<-read.table("c:/IDs.tab",header =TRUE,quote= "'", sep="\t") * Fragment of file is as follow: ID Pathway 04916Melanogenesis 04920Adipocytokine signaling pathway 04930Type II diabetes mellitus 04940Type I diabetes mellitus 0