Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-02 Thread Martin Maechler
> Bert Gunter > on Mon, 2 May 2016 06:20:52 -0700 writes: > Martin et. al.: > na.omit(frame) will remove all rows/cases in which an NA occurs. I'm > not sure that this is what the OP wanted, which seemed to be to > separately remove NA's from

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-02 Thread Bert Gunter
Martin et. al.: na.omit(frame) will remove all rows/cases in which an NA occurs. I'm not sure that this is what the OP wanted, which seemed to be to separately remove NA's from each column and plot the resulting column. This is what the lapply (and the OP's provided code) does, anyway. Also,

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-02 Thread Martin Maechler
> Mike Smith > on Sun, 1 May 2016 08:15:44 +0100 writes: On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: Hi First post and a relative R newbie I am using the vioplot library to produce some violin

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-01 Thread David Winsemius
> On May 1, 2016, at 12:15 AM, Mike Smith wrote: > On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: > Hi > First post and a relative R newbie > I am using the vioplot library to produce some violin plots. > > DW> It's a package,

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-01 Thread Mike Smith
>>> On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: >>> Hi >>> First post and a relative R newbie >>> I am using the vioplot library to produce some violin plots. DW> It's a package, not a library. >>> I have an input CSV with columns off irregular length that

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread Jeff Newmiller
But require() should not be used interchangeably with library()... the return value from require() should always be tested. -- Sent from my phone. Please excuse my brevity. On May 1, 2016 3:03:59 AM GMT+01:00, Tom Wright wrote: >Never let it be said there's only one way to

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread Tom Wright
Never let it be said there's only one way to do a thing: require(ggplot2) require(dplyr) #create a sample dataset dat <- data.frame(y1=sample(c(1:10,NA),20,replace=TRUE), y2=sample(c(1:10,NA),20,replace=TRUE),

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread David Winsemius
> On Apr 30, 2016, at 4:16 PM, David Winsemius wrote: > > >> On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: >> >> Hi >> >> First post and a relative R newbie >> >> I am using the vioplot library to produce some violin plots. It's a package,

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread David Winsemius
> On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: > > Hi > > First post and a relative R newbie > > I am using the vioplot library to produce some violin plots. I have an input > CSV with columns off irregular length that contain NAs. I want to strip the > NAs out and

[R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread Mike Smith
Hi First post and a relative R newbie I am using the vioplot library to produce some violin plots. I have an input CSV with columns off irregular length that contain NAs. I want to strip the NAs out and produce a multiple violin plot automatically labelled using the headers. At the moment