Giter VIP home page Giter VIP logo

Comments (19)

yihui avatar yihui commented on July 29, 2024

安装pandoc,然后再运行./knit html就会生成一个完整的带目录的HTML文件。不过目前你的R代码有些地方好像还有问题,至少上次我运行knitr编译通不过。还有一个地方可能用了edit()或fix(),这样的函数最好不要用,原因有二:

  1. 它们鼓励用户在R里面通过界面的方式修改数据,这是很糟糕的数据处理方式,不可重复;所有数据修改一定要用代码改;
  2. 代码运行到这里会停下来等待用户操作,比如跑knitr的时候。

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

嗯 是有edit()出现,只是为了举例……其实前面就给出替代方案了……

已经修正了,你试试能跑出结果来了么?

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

其实你不必删除,用选项eval=FALSE就可以了

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

编译出来的文件已经上传到:https://github.com/cloudly/Play-Econometrics-with-R/downloads

放在库目录下就可以看了。我看了一下HTML输出,有一肚子建议,等我抽空一一提出。

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

嗯嗯 有没编译出来的地方,还有各种typo...不过看到一个成型的东西,感觉还是蛮开心的,哈哈~~~~

2012/4/10 Yihui Xie <
[email protected]

编译出来的文件已经上传到:https://github.com/cloudly/Play-Econometrics-with-R/downloads

放在库目录下就可以看了。我看了一下HTML输出,有一肚子建议,等我抽空一一提出。


Reply to this email directly or view it on GitHub:

#2 (comment)

Find me at www.cloudlychen.net

M.Sc Economics
Barcelona Graduate School of Economics
Ramon Trias Fargas, 25-27
08005 Barcelona
Google Talk: [email protected]

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

是啊,写这种和程序有关的文档最爽的就是编完一看,图啊表啊代码啊神马的全都冒出来了,相当有成就感(其实有时候也就是在撑页数,哈哈)

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

我还是没搞定…… knit 是用R调用么?

我在win 7下,输入 Rscript knit html
报错为:
Error: could not find function "pat_gfm"

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

markdown的支持是我在最新的开发版本中支持的,所以你需要安装开发版本:

https://github.com/yihui/knitr#readme

不过建议你明天再装,因为这里面还有些不成熟的东西我正在微调,快调完了。

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

代码中错误太多啊,我都不忍心跑下去了:)

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

还有很多错误?呃....

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

你跑一遍就知道了

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

抱歉刚刚从杭州回来……哈哈这周末useR们在上海玩的很开心 :D 我已经开始当knitr的小白鼠了,fighting~

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

木事儿,玩得开心就好

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

plot()搞不定……5555

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

有啥搞不定的啊?图形都会自动处理,比如

``` {r plot-demo}
plot(1)
```

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

.有几个比较诡异的问题:
比如这行,

names(sample)[2] <- "RECORD_DAY"

## Error: names() applied to a non-vector

还有这种报错:

## Error: object of type 'closure' is not subsettable

都是为啥啊...直接在R里运行这些代码是没有问题的啊。

from play-econometrics-with-r.

cloudly avatar cloudly commented on July 29, 2024

还有这种错误。。。。

## Error: cannot open file 'cache-upload/sur_1fc09f25342da747c062498313dc32c6.rdb': No such file or directory

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

names(sample)[2]错误我回头检查一下,不过sample显然是一个糟糕的名字(况且它还是R自带的函数);关于变量名命名,记住这句话:

你不会给你的猫起名叫“猫”,给狗起名为“狗”,所以不要给样本起名叫“sample”,不要给数据起名叫“data”

命名是编程中最难的部分之一。

from play-econometrics-with-r.

yihui avatar yihui commented on July 29, 2024

我查了几个小时,终于找出图片出错的原因了。说起来话太长,解决方案和简单的解释参见 7aea43c

其它的错误要是还存在请新开issue讨论。

from play-econometrics-with-r.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.