powered by
The functions hostname and pid return the host name and the PID, respectively.
hostname
pid
hostname()pid()
pid()
returns a string
returns an unsigned integer
If R runs on a unix platform the host name and the PID are returned, otherwise the empty string and naught, respectively.
# NOT RUN { cat("The name of your computer is '", hostname(), "'. Your R program has current pid ", pid(), ".\n", sep="") # }
Run the code above in your browser using DataLab