How do I load example datasets in R?

前端 未结 2 1240
野的像风
野的像风 2021-02-03 11:45

Let\'s say I want to reproduce an example posted on StackOverflow. Some have suggested posters use dput() to help streamline this process or one of the datasets available in th

2条回答
  •  梦谈多话
    2021-02-03 12:15

    Here's one handy option:

    site.data <- read.table(textConnection(
    "        site year     peak
    1  ALBEN    5 101529.6
    2  ALBEN   10 117483.4
    3  ALBEN   20 132960.9
    8  ALDER    5   6561.3
    9  ALDER   10   7897.1
    10 ALDER   20   9208.1
    15 AMERI    5  43656.5
    16 AMERI   10  51475.3
    17 AMERI   20  58854.4"))
    

提交回复
热议问题