Learn R Programming

RandomFieldsUtils (version 1.2.5)

host: System calls

Description

The functions hostname and pid return the host name and the PID, respectively.

Usage

hostname()

pid()

Arguments

Value

hostname

returns a string

pid

returns an unsigned integer

Details

If R runs on a unix platform the host name and the PID are returned, otherwise the empty string and naught, respectively.

Examples

Run this code
# 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