R crash course: Writing functions

R crash course: Writing functions

As you know by now, R is all about functions. In the event that there isn’t one for the exact thing you want to do, you can even write your own! Writing your own functions is a very useful way to automate your work. Once defined, it’s easy to call new functions as often as you need. It’s a good habit to get into when programming with R — and with lots of other languages as well.

R crash course: Workspace, packages and data import

R crash course: Workspace, packages and data import

In this crash course section, we’ll talk about importing all sorts of data into R and installing fancy new packages. Also, we’ll learn to know our way around the workspace.

Your workspace in R is like the desk you work at. It’s where all the data, defined variables and other objects you’re currently working with are stored. Like with a desk, you might want to clean it every once in a while and throw out stuff you don’t need any more. There’s a few useful commands to help you do that. Take a look and try them out:

R crash course: Vectors

R crash course: Vectors

Now that you installed RStudio, learned about assignments and wrote some basic code, there’s nothing stopping you from becoming a journocoder!

To get a deeper understanding of how R stores your data, we’re now going to take a closer look at data structures in R, starting with a central concept: Vectors.

R crash course: Getting started

At journocode, we’re starting out with an intro to the tool we rely on most right now: The statistical programming language R. “R: A Language for Data Analysis and Graphics” is mostly used in statistics, but is very useful for journalists working with data as well.

Hello, World!

This is exciting! We’re very happy to announce that our website — this website — is finally up and running. Here you will find documentation and tutorials from all our meetings as well as info on our projects and upcoming events.

We are journocode, a group of journalists and computer scientists from Dortmund, Germany. We’ve been meeting since October to code for journalism. We’re especially invested in data driven journalism and want to teach ourselves and everyone who is interested the skills it takes to tell stories with data. This includes, but is not limited to:

  • basic programming skills in languages including R, JavaScript, Python and more
  • getting and processing data properly
  • visualizing data beautifully and correctly

We are committed to the concept of Open Knowledge and Open Data, which is why we will not only upload a summary of our weekly meetings here on journocode.com, but will also make any useful code available on our GitHub page.

Over the next few days, we will subsequently add documentation on our previous meetings. So stay tuned for resources on Programming with R and an intro to Version control with Git.

You can also follow us and our members on twitter. If you have any comments, want to learn or teach with us or just want to say hi, feel free to contact us.

Cheers,

the journocode team