[R] calculate column means when missing data is present

2007-11-26 Thread Luke Neraas
a mean of NA X <- X[!is.na(X)]# Effectively removes the NA values but now I cannot calculate Column Means # Below is the result of the column means I am looking for result c1 c2c3 c4c5 [1,] 3.22 3.75 3.5 3.75 4.125 # any help or ideas would be greatly appreciated # than

[R] conduct pairwise column comparisons without comparing a column to itself

2007-10-19 Thread Luke Neraas
NA NA NA # 15 43 2 NA NA 2NA NA # 1644 NA NA NA NA NANA #

[R] (no subject)

2007-10-19 Thread Luke Neraas
NANA NANA # 1234NANANANA NANA # 1341NANANANA NANA # 144 2 NA 2 2NA NANA # 1543 2NA

[R] Addition operation based on specific columns and rows of two data frames

2007-10-12 Thread Luke Neraas
tching # the row value from the first two columns of each data.frame. I have tried the "merge" function but that # doesn't give me the addition operation. # here is what i would like the resulting operation to end up with in the X.df data frame X.df$Counts <- c(0,2,0,0,1,0,1,0.5,0,

[R] Trouble obtaining results from a loop

2007-10-02 Thread Luke Neraas
]==j & P.genotype.sample[,8]==j) } for(j in 1:8){ true.result[j,5] <-sum(P.genotype.sample[,9]==j & P.genotype.sample[,10]==j) } true.result # Any suggestions or help on how to make this loop work would be greatly appreciated. # Thanks in advance Luke Neraas

[R] create data frame(s) from a list with different numbers of rows

2007-09-27 Thread Luke Neraas
.df2 sample.df3 sample.df4 sample.df5 sample.df6 # In the future i will have up to 1,200 of these small dataframes to create. # is there a way to loop through the list and create many small data frames?? # or perhaps make each of the list elements the same length and create one large data frame

[R] Paste a matrix column in pairwise fashion with other columns?

2007-09-25 Thread Luke Neraas
Column.1.2.data.matrix[,i]<-Column.1.2.data.list[[i]] } Column.1.2.data.matrix # However i will have many more data columns to compare to in a larger data set # and I was wondering if there was a more clever way to do this and still # come up with the same result. # Any help would be greatly

[R] Help create a loopto conduct multiple pairwise operations

2007-09-20 Thread Luke Neraas
as possible Any help would be greatly appreciated. Thanks in advance Luke Neraas [EMAIL PROTECTED] University of Alaska Fairbanks School of Fisheries and Ocean Sciences 11120 Glacier Highway UAF Fisheries Division Juneau, AK 99801 [[alternative HTML version deleted]]

[R] Create a loop to conduct multiple pairwise binary operations Retry

2007-09-18 Thread Luke Neraas
50 different data frames so I need the code to be # as flexible as possible Any help would be greatly appreciated. Thanks in advance Luke Neraas University of Alaska Fairbanks School of Fisheries and Ocean Sciences 11120 Glacier Highway UAF Fisheries Division Juneau, AK 99801

[R] Create a loop to conduct multiple pairwise binary operations

2007-09-18 Thread Luke Neraas
de to be # as flexible as possible Any help would be greatly appreciated. Thanks in advance Luke Neraas University of Alaska Fairbanks School of Fisheries and Ocean Sciences 11120 Glacier Highway UAF Fisheries Division Juneau, AK 99801 [[alternative HTML version deleted]] __