Re: [R] Sorting NA's and Graphing a histogram

2009-11-05 Thread Jorge Ivan Velez
Hi Koraleus, Here is a suggestion to (almost) do what you want: # data set x <- read.table(textConnection("Alpha Beta Gamma Delta A 12 34 B NA 2 45 D 8 9 10 11 E 5 NA 7 13"), header=TRUE) closeAllConnections() x # plot m

Re: [R] Sorting NA's and Graphing a histogram

2009-11-05 Thread Koraelus
Hello all, Thank you for you help with the first part, it worked perfectly. I now have a dataset that is culled to only include rows with no NA's or only 1 NA. What I want to achieve with the graph is: Plot the new data matrix: > Alpha Beta Gamma Delta > A 12 34 > B NA

Re: [R] Sorting NA's and Graphing a histogram

2009-11-02 Thread Jorge Ivan Velez
Hi Koraelus, Here is a suggestion for the first part: index <- apply(Dataset, 1, function(x) sum( is.na( x ) ) < 2 ) d2 <- Dataset[index ,] d2 # Alpha Beta Gamma Delta # A 12 3 4 # BNA2 4 5 # D 891011 # E 5 NA 713 Could you please ex

[R] Sorting NA's and Graphing a histogram

2009-11-02 Thread Koraelus
Let's say I have a dataset Dataset<-read.csv("Dataset.txt", header=T, row.names=1) Dataset Alpha Beta Gamma Delta A 1 23 4 B NA24 5 C NA3NA NA D 8 9 10 11 E5 NA 713 F NANA NA 4 I