![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
R语言
linpansheng
这个作者很懒,什么都没留下…
展开
-
R语言-提取字符长度nchar函数与length函数
R语言中nchar函数:主要使用来返回字符长度而length函数:则是用来返回字符数量#Getting the length of a stringx="John"y=c("Jim","Tony","kavry")nchar(x) #return the number of characters in the stringnchar(y) #if a vector,return原创 2014-03-27 13:33:21 · 17855 阅读 · 0 评论 -
R语言-连接、提取字符、分割字符、替换字符函数学习
连接函数paste,用于连接字符#paste function#join together two or more strings into one stringpaste("I","love","R language.")paste("I","love","English.",sep="-")paste("I","love","English.",sep="")paste("1+1="原创 2014-03-27 14:38:04 · 4430 阅读 · 0 评论 -
R语言-时间、日期函数使用
R语言的日期主要涉及以下函数:Sys.Date():返回当前系统时间as.Date:转化为日期格式ISOdate(year, month, day):连接年月日并转化为时间格式as.POSIXlt函数:主要提取年、月、日、某年第几天、某周第几天等seq函数:主要构建时间序列函数,对数字序列也适用具体操作案例如下:#Date functionSys.Date()#r原创 2014-03-27 23:17:01 · 4621 阅读 · 0 评论