[R-sig-Epi] import data repeadeatly

BXC (Bendix Carstensen) bxc at steno.dk
Fri Mar 28 08:32:52 CET 2008


It's not entirely clear to me what goes on, but insert some commands that tells you what kind of structures you get and the dimension of them under way. str() is a good bet.

Otherwise you must tell us in mor detail what goes wrong.

regards,
Bendix Carstensen 
______________________________________________

Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2-4
DK-2820 Gentofte
Denmark
+45 44 43 87 38 (direct)
+45 30 75 87 38 (mobile)
bxc at steno.dk   http://www.biostat.ku.dk/~bxc

> -----Original Message-----
> From: r-sig-epi-bounces at stat.math.ethz.ch 
> [mailto:r-sig-epi-bounces at stat.math.ethz.ch] On Behalf Of 
> Henrik Kallberg
> Sent: 28. marts 2008 08:08
> To: r-sig-epi at stat.math.ethz.ch
> Subject: [R-sig-Epi] import data repeadeatly
> 
> Repeadeately
> Dear All!
> I'm an unexperienced user of R. I'm trying to import 
> varaibles in a stepwise manner from a huge data set (whole 
> genome scan data from a case control study). I'm not sure 
> that my code will work and I know that the current code is 
> not working the way I want it to work. I would like to import 
> data and do some calculations and then store the results and 
> then import a new variable and do the same calculations again 
> for the latter variable and so on. In the code below there is 
> no calculations yet (i'm just trying to solve the import 
> problem). Please.Can anyone give me som suggestions.
> snpSelect<<- function(data, KIND, i){
> rsp<<-cbind(subset(read.table(data, header = TRUE), 
> select=KIND+i)) rsp } datan<-matrix(0, nrow=1574, ncol=5) 
> for(i in 1:(length(q))){
> datan[,i]<<-snpSelect("c:/program/R/test.txt",KIND,i)
> }
> Best regards Henrik Källberg
> 
> 	[[alternative HTML version deleted]]
> 
> 



More information about the R-sig-Epi mailing list