小编jju*_*nju的帖子

如果我有英特尔酷睿i7和64位Windows 7,要安装哪个python?

我必须从http://www.python.org/download/releases/2.5.4/安装Python 2.5.4,这是pcraster程序所必需.

但是
对于x86处理器有三个python选择:python-2.5.4.msi
对于Win64-Itanium用户:python-2.5.4.ia64.msi
对于Win64-AMD64用户:python-2.5.4.amd64.msi

我知道我有Win64,但我不确定我的i7处理器是Itanium还是AMD?知识渊博的人能帮助我吗?

python 64-bit

10
推荐指数
3
解决办法
3万
查看次数

设置Vim以在Windows中使用R和Sweave

我已经在Windows中安装了vim并且想配置它以便我可以向R发送代码.我也想用它来使用Sweave.但是,我已经谷歌搜索并没有找到关于如何设置它的明确的逐步说明.

到目前为止我的尝试:

  1. 使用来自ftp://ftp.vim.org/pub/vim/pc/gvim73_46.exe的可执行文件安装Vim
  2. https://github.com/jcfaria/Vim-R-plugin/zipball/master下载了R-plugin 并将其解压缩到我电脑上的文件夹中.按照r-plugin.txt文件中的说明,我安装了python-3.2.msi和pywin32-216.1.win32-py3.2exe.我将插件zip文件解压缩到C:\ Program Files(x86)\ Vim\vimfiles \将命名文件夹合并在一起.然后我打开了Vim并键入:helptags C:\ Program Files(x86)\ Vim\vimfiles\doc.我关闭Vim然后我开始R并重新打开Vim.我键入:new anewfile.R并收到错误消息

"必须启用Python界面才能运行Vim-R-Plugin.请执行':h-plugin-installation details

当我输入这个我得到

error149,对r-plugin-installation没有帮助

我也没有看到将代码发送给R的按钮.

我无法理解"您可能需要调整| vimrplugin_sleeptime |的值"的说明.

我该怎么办? - 我的PC上已经安装了Miktex 2.9.Vim会看到它吗?如何设置Vim以查看Latex?将不胜感激任何帮助.

注意:我使用了rstudio与Sweave以及eclipse但是我需要解决一些问题,因此需要尝试使用vim并查看它是如何工作的.

windows vim latex r sweave

5
推荐指数
1
解决办法
696
查看次数

如何使用 dyn.load 获取加载到 R 中的 DLL 内的函数列表

几年前,我编写了一个 dll,其中包含一些用于运行水文模型的函数。我忘记了 dll 内函数的名称和参数,不幸的是我忘记写一个好的文档文件。这些功能很复杂,所以我不想经历我可以使用的需要重写代码的替代方案。

我已将 dll 加载到 R 中,但正如我所说,我既不记得函数的名称,也不记得函数的语法。

如何列出函数以及如何查看函数的语法和我应该提供的参数?我知道参数是常见的模型输入,但老实说我不记得格式了。

此外,加载 dll 不会给出错误,但检查它是否已加载会给出FALSE。我怎样才能解决这个问题?

> x<-dyn.load("hbv_R64.dll")
> is.loaded("hbv_R64")
[1] FALSE
Run Code Online (Sandbox Code Playgroud)

c++ dll r

5
推荐指数
2
解决办法
2340
查看次数

为什么 as.POSIXct 使我的时间增加 1 小时?

下面是我的 R 代码,它的行为很奇怪。我预计输入的时间为 22:00,但我得到的是 23:00。

as.POSIXct(chron(dates="01/04/06",times="22:00:00"),tz="CET")
[1] "2006-01-04 23:00:00 CET"
Run Code Online (Sandbox Code Playgroud)

在我的代码的下一行中,我使用结果从 xts/zoo 对象中选择一个窗口:因此,忽略错误并输入 21:00 (上面)是没有用的,因为它返回错误的数据。使用上述代码的结果进行窗口化会返回正确的值。

head(qs<-as.zoo(window(Q,start=as.POSIXct(chron(dates="01/04/06",times="22:00:00"),tz="CET"),end=as.POSIXct(chron(dates="01/05/06",times="21:00:00"),tz="CET"))))
Run Code Online (Sandbox Code Playgroud)

以下是数据样本集 ( Q):

Stage.Qm  Flow.Qm Stage.QmDB Flow.QmDB Stage.Q1000 Flow.Q1000 Stage.Q1000DB Flow.Q1000DB
2006-01-04 23:00:00 541.1589 5.636957   541.1592  5.646017    541.5708   20.44692      541.5708     20.44692
2006-01-04 23:01:00 541.1589 5.637268   541.1592  5.645087    541.5701   20.41321      541.5701     20.41321
2006-01-04 23:02:00 541.1589 5.638604   541.1588  5.635806    541.5701   20.40946      541.5701     20.40946
2006-01-04 23:03:00 541.1589 5.638979   541.1588  5.635694    541.5704   20.42712      541.5704     20.42712
2006-01-04 23:04:00 541.1589 5.639619   541.1590  5.640691    541.5710   20.45848      541.5710     20.45848
2006-01-04 23:05:00 …
Run Code Online (Sandbox Code Playgroud)

time r

2
推荐指数
1
解决办法
368
查看次数

ggplot2; 将不同数据集和栅格/矩阵数据中的点添加到空间多边形数据框的绘图中

我试过这个,但我在 eval(expr,envir, enclos) 中得到错误:找不到对象“组”。pj4s 是一个包含经纬度投影的对象。

我的代码

fx.ggplot<-function(ctry,aesfill="id",scalefill="Country",pathcol="white"){
    #ctry is a shapefile of countries
     ctry@data$id = rownames(ctry@data)
    ctry.points = fortify(ctry, region="id")
    ctry.df = join(ctry.points, ctry@data, by="id")
    (txt<-paste("p<-ggplot(ctry.df) + aes(long,lat,group=group,fill=",aesfill,")"))
    eval(parse(text=txt))
    p<-p+   geom_polygon() +
        geom_path(color=pathcol) +
        coord_equal() +
        scale_fill_brewer(scalefill)
    return(p)
}

#generate a grid of points
xo<-seq(25,45,0.5)
yo<-seq(-15,5,0.5)
head(xy<-cbind(expand.grid(xo,yo)));names(xy)<-c("lon","lat")
head(xy.sp <- SpatialPoints(xy,proj4string=pj4s))
Overlay<-over(xy.sp,ctry)
xy<-xy[!apply(Overlay, 1, function(x) any(is.na(x))),]

#plot
(p<-fx.ggplot(ctry))
Run Code Online (Sandbox Code Playgroud)

这是 (p) 返回的国家的图

(P<-p+geom_point(data=xy, aes(x=lon, y=lat))) #addpoints returns Error

ggplot()+geom_point(data=xy, aes(x=lon, y=lat)) #This plots the points (as below) without error but in a new plot. 
Run Code Online (Sandbox Code Playgroud)

点的阴谋是成功的

#matrix …
Run Code Online (Sandbox Code Playgroud)

r ggplot2

1
推荐指数
1
解决办法
3018
查看次数

标签 统计

r ×4

64-bit ×1

c++ ×1

dll ×1

ggplot2 ×1

latex ×1

python ×1

sweave ×1

time ×1

vim ×1

windows ×1