Displaying 3 results from an estimated 3 matches for "allnum".
Did you mean:
alnum
2010 Jul 07
1
ifelse statement
Hi, I am a newbie of R, and playing with the "ifelse" statement.
I have the following codes:
## first,
for(i in 1:3) {
for(j in 2:4) {
cor.temp <- cor(iris.allnum[,i], iris.allnum[,j])
if(i==1 & j==2) corr.iris <- cor.temp
else corr.iris <- c(corr.iris, cor.temp)
}
}
this code is working fine.
I also tried to perform the same thing in another way with "ifelse":
for(i in 1:3) {
for(j in 2:4) {
cor.temp <- cor(iris.allnum[,i], iris.all...
2011 Nov 15
2
Regular expressions in R
...ytrax.com/tech/web/regex.htm#search) investigating regular
expressions I now have a basic grasp, but I am having difficulties removing
ALL of the instances or 1. or 2.
The code below removes just a SINGLE instance of the target string, but I
was expecting it to remove all instances as I have \\*.[[allnum]]. I did
try \\*.[[allnum]]*, but this did not work.
form<-sub("\\+*\\s*[[:alnum:]]*\\s*\\*.[[:alnum:]]", "", form)
I am obviously still not understanding something. If the list could offer
some guidance I would be most grateful.
Regards
Mike Griffiths
--
*Michael Gr...
2010 Mar 28
1
Renumbering
HI all,
Is there a renumbering function in R?
I would like to renumber the following id numbers
*Input file
*
Id Father Mother 123 0 0 124 0 0 125 123 124 126 123 0 127 125 126
128 0 127 130 123 125
*Output*
Id Father Mother 1 0 0 2 0 0 3 1 2 4 1 0 5 3 4 6 0 7 7 1 2
Any help is highly appreciated in Advance
Val K
[[alternative HTML version deleted]]