Tuesday, August 15, 2017

Science and passion

Since starting these news items, we have discussed themes related to mental health issues, their causes, and some solutions. Ardon Schnorr, a Biology PhD student at Carnegie Mellon University wrote a very powerful article around this theme that touches on a lot of issues surrounding this problem: http://www.chronicle.com/article/Grad-School-Is-Hard-on-Mental/240626. It is a must read for any graduate student. And if you are inspired by the positive effects of science communication, but do not know where to start, you can always start with the University of Guelph Let's Talk Science outreach program.

Wednesday, July 19, 2017

Blaming the victim, follow-up.

As expected, I was not the only one providing some push back to the Nature Jobs article I discussed previously. Together, they make reasonable suggestions, both towards the supervisor, and the university. The first one by D. A. McDonald acknowledges that supervisors should be open aware of all aspects of their graduate students' lives ("what they do when they are not in the lab"). The second one by D. Mehta and K. Vavitsas point out institutional resources that can help tackle one of the root problems ("providing more courses and resources to train principal investigators in management and leadership"). I wonder what the participation rate would be for UoG faculty if the university would offer these types of courses?

Tuesday, June 13, 2017

Problem in R: how to create a .Rprofile that does not hide important information ...

... but still is specific to each R script file. For instance, a lot of R users in our group load their packages at the top of their R scripts. Often, these packages are the same, but sometimes they add a different one for a specific type of analysis. I use the tidyverse all the time, and in some analyses vegan. A school of thought would be to automatically add these package to the start up using a .Rprofile file. Others would argue that this makes the code less reproducible, since some essential pieces of information are hidden from the R script file.

But what if you could have both? All the boilerplate stuff such as loading packages at the top of each R script file, but execute them automatically when you open that script file? I think I have found a solution to that mythical beast. I googled for it, but could not find anything similar, so that is why I provide my code here. Hopefully somebody else will find this useful, or point me to other, more elegant, solutions that I can incorporate in my own code.

How to create a generic but specific profile file that reads the beginning of each R file  

Copy this profile file either in your home directory or in each working directory. A quick google on .Rprofile and your OS will help you out for the advantages/disadvantages of these two approaches. However, I created this profile file to ensure that it will read all your script files within a folder, and execute them until it finds the line "# Startup ends here".

I assume that this will be mainly for loading libraries, so I specified the script to only read the first 30 lines, but you can increase/decrease this for your coding practices. I also made it recursive, so it will read all the script files within the folder structure, but you can change this too.

And I have also added some encouragement, that has the secondary objective that you can see if the .Rprofile code worked correctly.

You can find the code here on github: https://github.com/karl-cottenie/kc-.Rprofile

Snippet usage  

This works nicely with the new snippet I created. In RStudio > Preferences > code > Edit Snippets... copy the lines below, and save the updated snippets file.

snippet stup
## ${1:title}
## Karl Cottenie
`r paste("##", Sys.Date())`
# Add as much code here that you want to execute each time your script file is loaded.  
# Startup ends here 

Now if you type "stup" at the beginning of a file, it will paste the above code, you can add the title of your script file, and when you press your tab key the cursor will jump to the library command, and you can for instance add tidyverse, or ggplot, or whatever you normally use. The snippet will automatically add the date, of course you can/should change the author :-)

Problems with my code, other options?  

Just let me know, because there are probably edge cases I did not think about, and more elegant solutions that I will not find on my own.

Friday, May 26, 2017

Blaming the victim?

In the previous 2 blog posts, I discussed some sobering figures on the graduate experience, and how this is probably (partially) related to the lack of advisor evaluation (and training?). And then I read this column from naturejobs.com "A growing phobia". The author, with "30-plus years as faculty member" experience, proposes his (I assume a white man wrote this) solution to a student's fear of interacting with their advisor:  
"But if you are the student, understand that these meetings benefit you, and that it is your responsibility — not your supervisor's — to set them up. You need to be able to organize your thoughts, rethink experiments, present experimental results and interpretations and consider your next steps. These skills will make supervisor meetings less frightening and more useful."
So no mention of how the advisor can help the graduate student with the underlying causes of this fear? Because there are some clues scattered throughout the blog post:

  • "The supervisor, with the best of intentions, provides constructive criticism"
  • "remarking on the slow progress of one PhD student's research project at our second review meeting"
  • "Three months later, I repeated my concerns"
  • " I was too busy to notice for another six months."
  • "I was horrified when my suggestion elicited tears."
  • "Ideally, your supervisor will be empathetic until you can acclimatize to feedback and criticism"
Maybe I am reading too much into these comments, but look at the accompanying artwork: towering, stern male figure vs cowering grad student. The student does not fear the criticism per se, but the supervisor.

And how can we (supervisors, advisors, professors) create an environment that does not create this fear? This recent article reports on a survey done in an undergrad setting, but the conclusions are equally applicable to graduate advising, I think. Some of the facilitators are difficult to change or impractical ("Professor has good personality", "Professor gives their phone number"), and some of the suggested facilitators are behaviours that are difficult to quantify or change, such as encouraging, caring, inviting and open, willing or eager to help. But some suggestions are very practical and, if grad student interactions are important to you, relatively easy to implement (I added the bold to certain words):

  • "Professor uses and answers email"
  • "Professor has many and flexible office hours"
  • "Professor has accessible office hours"
And doing these things would show the student that you care. When you are too busy to notice the absence of one of your own students for six months, maybe it is no wonder that a student does not feel important or valuable.

Tuesday, May 23, 2017

New lab member!

Welcome Jennifer Gleason! Jennifer recently finished her MSc with where she looked at aquatic macroinvertebrate community composition:
"The Northern Prairie Pothole Region (NPPR) of Alberta, Canada contains numerous shallow marshes that serve as important habitat for wildlife and provide many essential ecosystem services. Many of these pothole wetlands have been destroyed or degraded by agricultural activity, prompting research into their condition and management. Aquatic macroinvertebrates are frequently used as indicators of environmental condition in rivers and lakes, but their effectiveness as indicators in prairie pothole marshes is not clear. I discovered that, contrary to my predictions, macroinvertebrate richness and community composition at family-level resolution do not respond to land use. Instead, macroinvertebrate community composition in pothole marshes is structured primarily by hydroperiod, which ranges from temporary, through seasonal and semi-permanent, to permanent marsh classes."
 After her undergrad degree, she worked at BIO, and for her PhD she will combine both expertises (molecular identification and macroinvertebrate community composition) to investigate anthropogenic influences at the landscape scale. Very exciting!