Lee's interests

Lee's posts

Post has attachment

**Desktop DeployR**

I'm going to be giving a talk this Thursday at my local R/Data Science Meetup about my method for deploying self contained desktop R applications. Since my original post on the subject (over 2 years ago!) I've made many of improvements thanks to the many us...

Post has attachment

Public

**Facing your data**

A few years ago, I came across a post on FlowingData about using Chernoff Faces as a fun way to visualize multidimensional data: > The assumption is that we can read people 's faces easily in real life,

> so we should be able to recognize small differences...

Post has attachment

Public

Lee Pang commented on a post on Blogger.

Glad to help! Hope it works out as well for you as it did for us.

Post has attachment

Public

Lee Pang commented on a post on Blogger.

So far, the fix to the problem in my post is holding. As for your related issue, how about:

> vx <- list(x,x)

> vx

[[1]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

[[2]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

> vx[[1]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

> vx <- list(x,x)

> vx

[[1]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

[[2]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

> vx[[1]]

[1] "foo"

attr(,"myAtt")

[1] "bar"

Post has attachment

Post has attachment

Public

Lee Pang commented on a post on Blogger.

Nice post Chris. Regarding your comment about not having a function that takes a fit and produces a function with predictor variables as formal arguments, how about the following:

# simple lm() fit:

xyz = data.frame(x=runif(100), y=rnorm(100), z=rnorm(100))

fit.lm = lm(z ~ x*y, xyz)

# prediction function generator:

predictfun = function(fit) {

function(x, y) {

predict(fit, newdata=list(x=x, y=y))

}

}

# thus ...

f = predictfun(fit.lm)

x = rnorm(10); y = rnorm(10)

zhat = f(x, y)

# simple lm() fit:

xyz = data.frame(x=runif(100), y=rnorm(100), z=rnorm(100))

fit.lm = lm(z ~ x*y, xyz)

# prediction function generator:

predictfun = function(fit) {

function(x, y) {

predict(fit, newdata=list(x=x, y=y))

}

}

# thus ...

f = predictfun(fit.lm)

x = rnorm(10); y = rnorm(10)

zhat = f(x, y)

Post has attachment

Public

never hurts to experiment with "incompatible" things

Post has attachment

Public

It's about time I figured out R packaging.

Public

Google Docs (e.g. Writely) needs Markdown editing mode.

Post has attachment

Public

Postdoctoral research done, and first author!

http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002880

http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002880

Wait while more posts are being loaded