Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何将月和日转换为日期格式?_R_Datetime - Fatal编程技术网

R 如何将月和日转换为日期格式?

R 如何将月和日转换为日期格式?,r,datetime,R,Datetime,我想更改此数据格式: # A tibble: 366 x 4 # Groups: year, month [?] year month day mean_per_day <int> <dbl> <int> <dbl> 1 2013 1 1 11.6 2 2013 1 2 13.9 3 2013 1 3 11.

我想更改此数据格式:

# A tibble: 366 x 4
# Groups:   year, month [?]
    year month   day mean_per_day
   <int> <dbl> <int>        <dbl>
 1  2013     1     1        11.6 
 2  2013     1     2        13.9 
 3  2013     1     3        11.0 
 4  2013     1     4         8.95
 5  2013     1     5         5.73
 6  2013     1     6         7.15
 7  2013     1     7         5.42
 8  2013     1     8         2.55
 9  2013     1     9         2.28
10  2013     1    10         2.84
# ... with 356 more rows
#一个tible:366x4
#组:年、月[?]
年-月-日平均日
1  2013     1     1        11.6 
2  2013     1     2        13.9 
3  2013     1     3        11.0 
4  2013     1     4         8.95
5  2013     1     5         5.73
6  2013     1     6         7.15
7  2013     1     7         5.42
8  2013     1     8         2.55
9  2013     1     9         2.28
10  2013     1    10         2.84
# ... 还有356行
是否添加到与每行对应的日期格式的列?(例如,第5行我想要2013年1月5日) 或者有没有办法计算一年中的天数?(例如,2月5日是一年中的第36天)
另外,您建议如何绘制每天的“平均每天”变量?(使用ggplot2)

欢迎使用StackOverflow!请阅读相关信息以及如何给出建议。这将使其他人更容易帮助你。也请一次问一个问题。在这里,您将通过粘贴列和绘图方式来混合定义日期时间。