search for: prob_tabl

Displaying 2 results from an estimated 2 matches for "prob_tabl".

Did you mean: prob_table
2009 Dec 15
1
Changing Column names in (Output) csv file
...ONS$Var5[i], ONS$Var6[i], ONS$Var7[i], ONS$Var8[i],ONS$Var9[i], ONS$Var10[i])  }   write.csv(data.frame(labels = Names), 'Names.csv', row.names = FALSE)   result = data.frame(read.csv('Names.csv')$labels, read.csv('joint_probs.csv')$Freq)   write.csv(data.frame(result), 'prob_table.csv', row.names = FALSE)   # The PROBLEM   When I open the prob_table.csv file in Excel, instead of having column names as lables and Freq, I get the column heads as   read.csv..Names.csv...labels                                       read.csv..joint_probs.csv...Freq R11 R21 R31 R41 R51 R61 R...
2009 Dec 28
2
Modified R Code
...__________________________________________________________________________________________________________________   ONS = read.csv('joint_probs.csv') Names <- apply(ONS[, -5], 1, paste, collapse = ' ') write.csv(data.frame(rate_combination = Names, Probability = ONS[, 5]), 'prob_table.csv', row.names = FALSE) # ______________________________________________________________________________________________________________________________________________________________________________________________________________________________ N = 10000 # No of random numbers to be gener...