Useful resources for an R blog

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: