08 November 2024

Student saves the R day

I am on a modernising spree! I had worked out how to, in theory, plot up the sort of data we gather during our annual glaciological field trip, in RStudio. The one thing I was struggling with is getting the data into the software. When our students are taught R, they are advised to work online, rather than in the desktop app. And I could make the scripts work, but I didn't know how to get an input file in there. So far I had basically got around that by just copying my data straight into R and saving it as a file. And that is fine for a proof of concept, but if you have a file with the data gathered by 15 groups of students, that becomes impractical. It was time I would learn how to do this the proper way.

RStudio has this button that says "import data", but it then only allows you to import it from a directory of which my computer doesn't know where it is. And if my computer doesn't know, I don't know. I decided I really needed to find out, and I asked the lady who had helped me before if she could help me again. And we had a look together. She had no clue either! And she needed to know this as well.

By chance, she was just about to see her master student. When the student saw me she wanted to go away; clearly my colleague was already engaged in something. But we waved her in. And I just asked her if she knew the answer. She did!

It turns out that there is another button that says "upload", And if you click that, you do actually get access to all your file space. And once you have uploaded your file onto the mystery directory, you can "import" it from there. It was that simple! But as far as I am concerned, not intuitive at all. But that was all I needed to know. I thanked her and went back to my office. And no time later I had all my data imported, and a whole new set of graphs produced. Success!

 

Fast graphs! 

 

No comments:

Post a Comment