How to take out data set from r-package?

#1
It is known that r-packages can contain data set. How (in the general case) take out this data set (to open in Excel)? If possible, please explain clearly for the beginner :). P.S. As an example, one can take data set flchain available in the survival package. Thanks! (Win 7)
 
Last edited:

bugman

Super Moderator
#2
use the "write" function.

In this case, the dataframe "BOD" is saved as a csv file called "test.csv" and saved to my working directory.

Code:
write.csv(BOD, file="test.csv")