Re: [R] Not seeing the results of a function

2020-03-30 Thread Eric Berger
There is also the possibility that the OP believes that the function calls are passing by reference. On Mon, Mar 30, 2020 at 5:55 PM Richard M. Heiberger wrote: > You need one more line In your function. > > addday <- function(stp,mcp,stpos,mcpos){ > stpos<-c(stpos,stp) > mcpos<-c(mcpos,mcp) >

Re: [R] Not seeing the results of a function

2020-03-30 Thread Richard M. Heiberger
You need one more line In your function. addday <- function(stp,mcp,stpos,mcpos){ stpos<-c(stpos,stp) mcpos<-c(mcpos,mcp) days<-c(1:length(stpos)) list(mcpos=mcpos, days=days) } This and the other question I just answered together say that you need to re-read an introduction to R. On Mon, Ma