Skip to content
Prev 302806 / 398503 Next

NULL column

Hi Silvano,

You can save the data as "filename.txt" and then call read.table()
For example,

I saved your data:
#################################################
????????????? beta0????????? beta1????????????? pvalor??????? Crom
?rs17????? 158.5980 12.252462 9.083193e-135??????? 1
?rs46????? 163.3730? 3.304276? 3.279925e-06????????? 1
?rs63????? 162.7924? 2.084678? 5.023893e-06????????? 1
?rs24????? 162.4252? 1.837208? 5.509042e-06????????? 1
##################################################
as "dat11.txt"
dat1<-read.table("dat11.txt",sep="",header=TRUE)
dat2<-data.frame(new=rownames(dat1),dat1)
rownames(dat2)<-1:nrow(dat2)
dat2
?? new??? beta0???? beta1??????? pvalor Crom
1 rs17 158.5980 12.252462 9.083193e-135??? 1
2 rs46 163.3730? 3.304276? 3.279925e-06??? 1
3 rs63 162.7924? 2.084678? 5.023893e-06??? 1
4 rs24 162.4252? 1.837208? 5.509042e-06??? 1

You can also save it as "filename.csv" and use read.csv() or read.delim() 
dat1<-read.csv("dat11.csv",sep="",header=TRUE)

Hope it helps.
A.K.



----- Original Message -----
From: Silvano Cesar da Costa <silvano at uel.br>
To: arun <smartpink111 at yahoo.com>
Cc: 
Sent: Wednesday, August 8, 2012 7:30 PM
Subject: Re: [R] NULL column

Hi Arun,

it worked perfectly.
The only problem is that the data set is great to put in the
read.table(text=" ")

But it worked.

Thank you
---------------------------------------------
Silvano Cesar da Costa

Universidade Estadual de Londrina
Centro de Ci?ncias Exatas
Departamento de Estat?stica

Fone: (43) 3371-4346
----------------------------
Message-ID: <1344469879.46190.YahooMailNeo@web142602.mail.bf1.yahoo.com>
In-Reply-To: <799cd30438e2f903cdf8ac6e05c5357d.squirrel@webmail.uel.br>