I've been using the ggplot2 package a lot recently. When creating a legend or tick marks on the axes, ggplot2 uses the levels of a character or factor vector. Most of the time, I am working with coded variables that use some abbreviation of the "true" meaning (e.g.
png("goodbye.png", height = 625, width = 500)

par(col = "purple")

plot(1, 1, xlim = c(0,800), ylim = c(0,1600), type = "n", bty = "n", xaxt = "n", yaxt = "n", xlab = "", ylab = "")

symbols(x = 400, y = 1200, circles = 400, add = T, lwd = 40)

lines(x = c(400, 400), y = c(900, 100), lwd = 40, lend

png("goodbye.png", height = 625, width = 500)
par(col = "purple")
plot(1, 1, xlim = c(0,800), ylim = c(0,1600), type = "n", bty = "n", xaxt = "n", yaxt = "n", xlab = "", ylab = "")
symbols(x = 400, y = 1200, circles = 400, add = T, lwd = 40)
lines(x = c(400, 400), y = c(900, 100), lwd = 40, lend = 1)
lines(x = c(480, 320), y = c(500, 500), lwd = 40, lend = 1)
polygon(x = c(400, 480, 400, 320, 400), y = c(-20, 200, 100, 200, -20), col = "purple", border = "purple")
polygon(x = c(450, 500, 500, 450), y = c(500, 600, 400, 500), col = "purple", border = "purple")
polygon(x = c(350, 300, 300, 350), y = c(500, 600, 400, 500), col = "purple", border = "purple")
curve(expr = 100*log(x)+250, from = 100, to = 700, add = T, lwd = 40, lend = 1)
polygon(x = c(600, 750, 720, 750, 600), y = c(900, 1100, 900, 700, 900), col = "purple", border = "purple")
symbols(x = 100, y = 620, circles = 50, add = T, lwd = 40, inches = F, bg = "purple")

dev.off()
0

Add a comment

R is great, and you can do a LOT OF stuff with it.

However, sometimes you want to do really basic stuff with huge or a lot of files. At work, I have to do that a lot because I am mostly dealing with language data that often needs some pre-processing.
I work with R on both Mac OS and Windows. On Windows, you get the option to copy the path of a file or folder by holding Shift while right-clicking on the file or folder. As useful as this feature is, it copies paths to your clipboard in Windows format, e.g.
I recently encountered some functionality in R which most of you might already know. Nevertheless, I want to share it here, because it might come in handy for those of you who do not know this yet.

Suppose you want to read in a large number of very large text tables in R.
I used knitr to hack together a very short tutorial about XML in R.

It's in German. And it's not very long. But, hey, it's free :)

I hope it can be of help to someone who wants to get started with XML processing in R.

Please feel free to post or send any comments about the thing.
Blog Archive
BlogRoll
BlogRoll
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.