Skip to content

values in between

2 messages · Jim Lemon, Srinivas Iyyer

#
Eric C. Jennings wrote:
Hi Eric,

Okay, what you probably want is:

seq(0.4,0.0,by=0.01*sign(0.0-0.4))
...

This can be worked into the function that I posted, but it's getting a 
bit tricky to make it general. What you want to do is to "walk" through 
the values creating a sequence between each one with the above call.

in.betweens<-function(x,increment) {
  lenx<-length(x)
  newx<-x[1]
  for(i in 1:(lenx-1))
   newx<-c(newx,seq(x[i],x[i+1],by=increment*sign(x[i+1]-x[i]))[-1])
  return(zapsmall(newx))
}

Jim
#
Dear group, 

could some one help me how i can split a string into
pieces and access them.

For example:
[1] "character"
[[1]]
[1] "th"      " "       " a test"


Now I want to get test into : a vector and another
object as list


Also, could you please point out some good tutorials
on character manipulations. 

Thank you. 



		
__________________________________________ 

Just $16.99/mo. or less. 
dsl.yahoo.com