Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread David Carlson
It might be easier to diagnose if you can show us what the first ten lines in your original file look like. readLines("gokind.nephropathy.fin", n=10) David L Carlson On Mon, Jun 1, 2020 at 6:36 PM Bert Gunter wrote: > Agreed! > > However, there may still be a problem, as read.table() ordinari

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Bert Gunter
Agreed! However, there may still be a problem, as read.table() ordinarily would read numeric columns correctly (via type.convert()) without the colClasses specification. So I would suspect that her "numeric" columns contain some non-numeric detritus (perhaps "," or some NA symbol). But of course,

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread David Winsemius
On 6/1/20 2:17 PM, Ana Marija wrote: > HI David, > > this is the problem: > > > NEP <- read.table("gokind.nephropathy.fin", > header=T,stringsAsFactors=FALSE) > > sapply(NEP,class) >         Chr          BP      Marker         MAF          A1        A2 > "character" "character" "character" "char

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Ana Marija
HI David, this is the problem: > NEP <- read.table("gokind.nephropathy.fin", header=T,stringsAsFactors=FALSE) > sapply(NEP,class) Chr BP Marker MAF A1 A2 "character" "character" "character" "character" "character" "character" Direction pValue

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread David Winsemius
On 6/1/20 1:37 PM, Ana Marija wrote: Hello, I have a dataframe like this: ChrBP Marker MAF A1 A2 Direction pValueN 1 10 10625 10:10625:A:G 0.416562 G A - 0.558228 1594 2 10 10645 10:10645:A:C 0.215182 C A - 0.880622 1594 ..

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Ana Marija
7th fileld, Direction contains only "+" and "-" On Mon, Jun 1, 2020 at 3:46 PM Bert Gunter wrote: > I count 8 fields in your data and 9 names in your heading ?? > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Opus

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Bert Gunter
I count 8 fields in your data and 9 names in your heading ?? Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 1, 2020 at 1:38 PM Ana Marija wrote: >