Archive

Monthly Archives: December 2012

Some useful information for using WordPress:

1)This link provide information for formatting source code in a WordPress blog.

For example, this bit of code
[sourcecode language="R"]
runif(1, 10)
[/sourcecode]

Produces this result in the blog:

rnorm(1,10)

To drop the line numbers, put “gutter = FALSE” in the first set of square brackets, producing this:

rnorm(10,10)

To prevent wrapping and add a scroll box, add “wraplines = FALSE” to the header

summary(glm(y_variables ~ x_1 + x_2 + x_1*x_2, family = gaussian, data = my_new_data[data_subset , ]))) #This code isn't really real
toolbar

WordPress Toolbar

By default there is a “tool bar” that allows you to download the code, print it, etc. To remove it, add “toolbar = “FALSE” to the header.  The result is this, which does not produce a the toolbar when you scroll over the code.

summary(glm(y_variables ~ x_1 + x_2 + x_1*x_2, family = gaussian, data = my_new_data[data_subset , ]))) #This code isn't really real

2)There are options for offline editing and publishing that can be found on the WordPress site.

Advertisements

Test

 

hist(random_poisson, ylim = c(0, 30))
abline(v = mean(random_poisson), col = 3, lty = 1, lwd = 4)
abline(v = median(random_poisson), col = 2, lty = 2, lwd = 4)
legend("topright",
legend = c("mean", "median"),
col = c(3,2), lty = c(1,2), lwd = 4,
bty = "n"
)
text(x = mean(random_poisson)-0.3, y = 30, labels = mean(random_poisson))
text(x = median(random_poisson)+0.3, y = 30, labels = median(random_poisson))

alt text test

Figure 1: test