How can I get the current timestamp in R?

You can get the current timestamp in R using the Sys.time() function, which returns the current date and time as a POSIXct object.