Displaying 2 results from an estimated 2 matches for "reorderb".
Did you mean:
reorders
2010 Dec 10
2
Reorder factor and address embedded escapes
...a 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
...a 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?
------------------------------
Message: 63
Date: Fri, 10 Dec 2010 12:16:23 -0800 (PST)
From: dreadgazebo <ernie.te...