楼主: Laplace_Yin
9200 21

[问答] strptime函数返回值异常 [推广有奖]

11
求证1加1 发表于 2013-10-16 18:25:30
please try this code
  1. Sys.setlocale("LC_TIME", "C");
  2. x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
  3. z <- strptime(x, "%d%b%Y")
  4. z
复制代码
已有 1 人评分论坛币 收起 理由
jiangbeilu + 10 精彩帖子

总评分: 论坛币 + 10   查看全部评分

个人主页,欢迎订阅http://chenangliu.info/

12
Laplace_Yin 发表于 2013-10-23 23:50:06
ryusukekenji 发表于 2013-10-16 17:05
咱也是使用Rstudio
是不是安装其他包会影响编译环境呢?我还装着lars、elasticnet,TSA等等的包

13
Laplace_Yin 发表于 2013-10-23 23:54:53
求证1加1 发表于 2013-10-16 18:25
please try this code
大神哪膜拜膜拜!!

14
Laplace_Yin 发表于 2013-10-24 00:07:15
求证1加1 发表于 2013-10-16 18:25
please try this code
请问一下,我怎么能把LC_TIME的默认取值为C呢?

15
Laplace_Yin 发表于 2013-10-24 15:07:47
求证1加1 发表于 2013-10-16 18:25
please try this code
大哥,再请教您一个问题,请问R里ddply函数是不是有时候跟POSIX格式冲突啊?数据框里有这类型数据的时候,调用ddply就会返回下面这个错误。
  1. Error in attributes(out) <- attributes(col) :
  2.   'names' attribute [9] must be the same length as the vector [1]
复制代码

16
求证1加1 发表于 2013-10-24 16:15:12
Laplace_Yin 发表于 2013-10-24 00:07
请问一下,我怎么能把LC_TIME的默认取值为C呢?
这我倒不是很清楚 但是为了保证的代码的可重复性 这种设置的语句还是习惯性的添加比较合适
个人主页,欢迎订阅http://chenangliu.info/

17
求证1加1 发表于 2013-10-24 16:16:38
Laplace_Yin 发表于 2013-10-24 15:07
大哥,再请教您一个问题,请问R里ddply函数是不是有时候跟POSIX格式冲突啊?数据框里有这类型数据的时候, ...
不是吧。。。你看看是不是其他地方有问题
个人主页,欢迎订阅http://chenangliu.info/

18
Laplace_Yin 发表于 2013-10-29 22:56:22
求证1加1 发表于 2013-10-24 16:16
不是吧。。。你看看是不是其他地方有问题
恩,谢大哥:D

19
jgw1213 发表于 2014-11-18 13:54:09
厉害,解决了!!!

20
幸运的小p超 发表于 2015-9-1 08:50:37
求证1加1 发表于 2013-10-16 18:25
please try this code
请问这个什么功能呢?调整了哪些环境变量呀?

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 12:35