search for: reordera

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

Did you mean: reorders
2010 Dec 10
2
Reorder factor and address embedded escapes
...e.g. "This\nLabel" in the csv becomes "This\\nLabel" in the data frame. So, I am trying to reorder the factor and deal with the introduction of a secondary \ . Here's a small example: A = c("A\\nB", "C\\nD") test <-data.frame(A) str(test) test$reorderA <-factor(test$A, c("C\\nD", "A\\nB")) str(test) test$reorderB <-sub("\\\\n", "\n", test$reorderA) str(test) When sub is applied to the now-correctly ordered factor, it returns to the default ordering. Suggestions?
2010 Dec 11
0
is there a packge or code to generate markov chains in R
...e.g. "This\nLabel" in the csv becomes "This\\nLabel" in the data frame. So, I am trying to reorder the factor and deal with the introduction of a secondary \ . Here's a small example: A = c("A\\nB", "C\\nD") test <-data.frame(A) str(test) test$reorderA <-factor(test$A, c("C\\nD", "A\\nB")) str(test) test$reorderB <-sub("\\\\n", "\n", test$reorderA) str(test) When sub is applied to the now-correctly ordered factor, it returns to the default ordering. Suggestions? ------------------------------ M...