Skip to content
Prev 78276 / 398502 Next

Problem building/checking library that requires input fro m user

What file are you putting these into?  

I believe this is the correct syntax for the \example{} section of an .Rd
file.

If you want to do this in a plain R file, (e.g. package/tests/somename.R),
you can use 

if(interactive)
{
 num_reps <- readline(""How many reps do you have... ")
 num_reps <- as.integer(num_reps)
}
else
 num_reps <- 10

instead.

-G