First successful script in R!

What better way  to end the week but with a successful run in R.  As with many things throughout your career, but it seems especially typical in graduate school, it would not have been possible without the help of several others along the way who each contributed their nuggets of wisdom.  That is what I really love about research, and perhaps science in general.   The great unknown,  a project beginning where you have no idea how to tackle a problem, and the slowly, piece by piece it starts coming together and forming something bigger!  This does not happen everyday, in fact it has been a shameful month that it took me from the time that I arrived until now (disclaimer: I did not receive a test data set until 2 weeks ago), so I will cut myself a little slack!!

I  don’t know how to format a blog post such that it even remotely looks like a piece of code. Maybe that’s better left for a screen shot. All you programmers out there, please resist the urge to snicker or laugh at the formatting.  I know it is not pretty, but it’s a start and it enabled me to import my data into a data frame, put it in correct columns and the read.delim2 format for reading the .txt file was essential since I am working with european conventions of using commas instead of decimal points in data.  It’s going to take me a while to get used to that.

I have several helpful manuals that have style guide conventions and will improve this.  As I finally moved past the hurdle of opening the original file with the appropriate command, it became intuitive that some sort of spacing was needed to differentiate the parts of the code. It just made sense.  I don’t know why I’ve waited so long to try a programming language or interface in this case because there are many visually appealing elements.  I also enjoy the logical object writing, is that the origin of the term ‘object-oriented’? well, it’s really almost sexy.  The code takes on a visual appeal with open space and flowing rhythms of text and organized numbers.  That kind of thinking works for me.

Advertisements

Tags: , , , , , , , ,

About hawright

marine ecologist

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: