In an R script, how do I create a sequence using variables for all parameters? -



In an R script, how do I create a sequence using variables for all parameters? -

it should simple enough, i'm not finding need in documentation. i'm sure don't know for.

i'm new r , have started writing script generate sequence 3 user input variables.

basically, want this

sequence<-seq(1,10,by=2)

to done

seqstart<-readline(prompt="sequence start") seqstop<-readline(prompt="sequence stop") seqint<-readline(prompt="interval") sequence<-seq(seqstart, seqstop, by=seqint)

you need convert result of readline numeric:

seqstart <- as.numeric(readline(prompt="sequence start")) seqstop <- as.numeric(readline(prompt="sequence stop")) seqint <- as.numeric(readline(prompt="interval")) mysequence <- seq(seqstart, seqstop, by=seqint)

r

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -