九游账号可以转移吗服能转r吗,怎么转,是7.8的数据吗

苹果/安卓/wp
积分 1175, 距离下一级还需 200 积分
权限: 自定义头衔, 签名中使用图片, 隐身
道具: 彩虹炫, 涂鸦板, 雷达卡, 热点灯, 金钱卡, 显身卡, 匿名卡, 抢沙发下一级可获得
权限: 设置帖子权限道具: 提升卡
购买后可立即获得
权限: 隐身
道具: 金钱卡, 彩虹炫, 雷达卡, 热点灯, 涂鸦板
苦逼签到天数: 175 天连续签到: 1 天[LV.7]常住居民III
如何将一下txt数据 转成&&timeSeries 类型的数据:
date& && && && && &&&value
08/01/1954& & & & 1.3
15/01/1954& & & & 1.28
22/01/1954& & & & 1.11
29/01/1954& & & & 1.01
05/02/1954& & & & 0.99
12/02/1954& & & & 0.91
19/02/1954& & & & 0.98
26/02/1954& & & & 0.98
05/03/1954& & & & 1.03
载入中......
要看你用哪个软件啦
心有多大,舞台就有多大。
#加载xts包,假设date是字符格式
libarary('xts)
date=as.Date(date,&%d/%m/%Y&)
value=as.xts(value,date)
plot(value)
xueyinchina 发表于
要看你用哪个软件啦使用s-plus!
godjsy 发表于
#加载xts包,假设date是字符格式
libarary('xts)
date=as.Date(date,&%d/%m/%Y&)不好意思没注明软件。R 和S-PLUS中都没有这个包,不过还是谢谢!
R有这个包,到下载
godjsy 发表于
R有这个包,到http://cran.r-project.org下载谢谢!
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
&nbsp&nbsp|
如有投资本站或合作意向,请联系(010-);
邮箱:service@pinggu.org
投诉或不良信息处理:(010-)
论坛法律顾问:王进律师R数据的导入和导出(转)
Error in scan(file = file, what = what, sep = sep, :
line 1 did not have 5 elements
Error in read.table("files.dat", header = TRUE) :
more columns than column names
cat("2 3 5 7", "11 13 17 19", file="ex.dat", sep="\n")
scan(file="ex.dat", what=list(x=0, y="", z=0), flush=TRUE)
A &- matrix(scan("matrix.dat", n = 200*2000), 200, 2000, byrow = TRUE)
A &- as.matrix(read.table("matrix.dat"))
A &- as.matrix(read.table("matrix.dat", header = FALSE, nrows = 200,
comment.char = "", colClasses = "numeric"))
writeLines(as.character((1+1e6):2e6), "ints.dat")
xi &- scan("ints.dat", what=integer(0), n=1e6)
xn &- scan("ints.dat", what=numeric(0), n=1e6)
xc &- scan("ints.dat", what=character(0), n=1e6) # 0.85s
xf &- as.factor(xc)
DF &- read.table("ints.dat")
code &- c("LMH", "SJC", "CHCH", "SPC", "SOM")
writeLines(sample(code, 1e6, replace=TRUE), "code.dat")
y &- scan("code.dat", what=character(0), n=1e6)
yf &- as.factor(y)
DF &- read.table("code.dat")
DF &- read.table("code.dat", nrows=1e6)
zz &- read.csv("mr.csv", strip.white = TRUE)
zzz &- cbind(zz[gl(nrow(zz), 1, 4*nrow(zz)), 1:2], stack(zz[, 3:6]))
Age values ind
& reshape(zz, idvar="id",timevar="var",
varying=list(c("V1","V2","V3","V4")),direction="long")
& data(UCBAdmissions)
& ftable(UCBAdmissions)
Admitted Male
512 353 120 138
17 202 131
Rejected Male
313 207 205 279 138 351
8 391 244 299 317
SELECT State, Murder FROM USArrests WHERE Rape & 30 ORDER BY Murder
SELECT t.sch, c.meanses, t.sex, t.achieve
FROM student as t, school as c WHERE t.sch = c.id
SELECT sex, COUNT(*) FROM student GROUP BY sex
SELECT sch, AVG(sestat) FROM student GROUP BY sch LIMIT 10
& library(RMySQL) # will load DBI as well
## 打开一个MySQL数据库的连接
& con &- dbConnect(dbDriver("MySQL"), dbname = "test")
## 列出数据库中表
& dbListTables(con)
## 把一个数据框导入到数据库,删除任何已经存在的拷贝
& data(USArrests)
& dbWriteTable(con, "arrests", USArrests, overwrite = TRUE)
& dbListTables(con)
[1] "arrests"
## 获得整个表
& dbReadTable(con, "arrests")
Murder Assault UrbanPop Rape
## 从导入的表中查询
& dbGetQuery(con, paste("select row_names, Murder from arrests",
"where Rape & 30 order by Murder"))
row_names Murder
3 California
5 New Mexico
& dbRemoveTable(con, "arrests")
& dbDisconnect(con)
& library(RODBC)
## 让函数把名字映射成小写
& channel &- odbcConnect("testdb", uid="ripley", case="tolower")
## 把一个数据框导入数据库
& data(USArrests)
& sqlSave(channel, USArrests, rownames = "state", addPK = TRUE)
& rm(USArrests)
## 列出数据库的表
& sqlTables(channel)
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME TABLE_TYPE REMARKS
## 列出表格
& sqlFetch(channel, "USArrests", rownames = "state")
murder assault urbanpop rape
## SQL查询,原先是在一行的
& sqlQuery(channel, "select state, murder from USArrests
where rape & 30 order by murder")
state murder
1 Colorado
3 California
5 New Mexico
6 Michigan
& sqlDrop(channel, "USArrests")
## 关闭连接
& odbcClose(channel)
& library(RODBC)
& channel &- odbcConnectExcel("bdr.xls")
## 列出电子表格
& sqlTables(channel)
TABLE_CAT TABLE_SCHEM
TABLE_NAME
TABLE_TYPE REMARKS
Sheet1$ SYSTEM TABLE
Sheet2$ SYSTEM TABLE
Sheet3$ SYSTEM TABLE
NA Sheet1$Print_Area
## 获得表单1的内容,可以用下面任何一种方式
& sh1 &- sqlFetch(channel, "Sheet1")
& sh1 &- sqlQuery(channel, "select * from [Sheet1$]")
zz &- file("ex.data", "w")
# 打开一个输出文件连接
cat("TITLE extra line", "2 3 5 7", "", "11 13 17",
file = zz, sep = "\n")
cat("One more line\n", file = zz)
## 使用管道(Unix)在输出中把小数点转换成逗号
## R字符串和(可能)SHELL脚本中都需要把 \ 写两次
zz &- pipe(paste("sed s/\\\\./,/ &", "outfile"), "w")
cat(format(round(rnorm(100), 4)), sep = "\n", file = zz)
## 现在查看输出文件:
file.show("outfile", delete.file = TRUE)
## 捕获R输出:使用 help(lm) 里面的例子
zz &- textConnection("ex.lm.out", "w")
example(lm, prompt.echo = "& ")
## 现在 `ex.lm.out' 含有需要进一步处理的输出内容
## 查看里面的内容,如
cat(ex.lm.out, sep = "\n")
## 读入前面例子中创建的文件
readLines("ex.data")
unlink("ex.data")
## 读入当前目录的清单(Unix)
readLines(pipe("ls -1"))
# 从输入文件中去掉拖尾的逗号。
# 假定我们有一个包含如下`数据'的文件
450, 390, 467, 654,
30, 542, 334, 432, 421,
357, 497, 493, 550, 549, 467, 575, 578, 342,
446, 547, 534, 495, 979, 479
# 然后通过如下命令读入
scan(pipe("sed -e s/,$// data"), sep=",")
& zz &- textConnection(LETTERS)
& readLines(zz, 2)
[1] "A" "B"
& scan(zz, "", 4)
Read 4 items
[1] "C" "D" "E" "F"
& pushBack(c("aa", "bb"), zz)
& scan(zz, "", 4)
Read 4 items
[1] "aa" "bb" "G"
& close(zz)
readBin(con, what, n = 1, size = NA, endian = .Platform$endian)
writeBin(object, con, size = NA, endian = .Platform$endian)
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。&&&&&&&&&&&
由于早期的一个项目在数据库设计建立时没有输出为E-R图,偶在对此项目进行二次改造升级时则使用了PD对原有的数据库进行反向工程,即根据数据源将数据库的的所有表生成为E-R图结构,我使用的是PD 15,反向工程的命令为于&File&菜单中的"Reverse Engineer&-反向引擎。其它的版本的PD应该在&Database&菜单中。详细步骤如下:
1、启动PD,新建一个Physical Diagram
2、菜单:Database-&Congfigure Connections 弹出Congfigure Data Connections 对话框
点击Add Data source 按钮,弹出创建新数据源对话框:
我们选择"系统数据源",下一步:
数据源驱动程序我们选择Sql Server,继续下一步:
点击&完成&,弹出创建到Sql Server的新数据源,在此对话框中,我们输入名称、描述、及服务器名或IP:
下一步:验证登录方式选择&使用用户输入登录ID和密码的SQL Server 验证&,并输入登录ID和密码
下一步:更改默认的数据库为你想要进行反向工作程的
下一步:完成
最后,会在Congfigure Data Connections 对话框中出现我们刚才新建的数据源了。
**********************************************************************************
2、菜单:File-&Reverse Engineer -&Database 出来New Physical Data Model对话框
点击&确定&按钮,弹出Database Reverse Engineering Options对话框:
在此我们选择Using a data source,点击数据源按钮弹出Connection to a Data Source对话框,在下拉框中选择我们之前建立的数据源,并输入User ID和password
点击Connection即可连接至数据库,并得取所有的数据库对象,在此我们选择所有的Table。
最后点击OK,大功告成!!,以下为部分截图:
阅读(...) 评论()}

我要回帖

更多关于 今天新开1区服的手游 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信