CrumpLab / statisticsLab

Lab manual for Psyc 3400 @ Brooklyn College
Creative Commons Attribution Share Alike 4.0 International
16 stars 22 forks source link

Psyc 3400 #18

Open CrumpLab opened 6 years ago

CrumpLab commented 6 years ago

Lab instructors post here to let me know you got your account working

shira623 commented 6 years ago

I'm set with a github account, Shira

Kanderson1234 commented 6 years ago

I was able to create my GitHub Account.

Kyle

fahd09 commented 6 years ago

I am here too.

Fahd

CrumpLab commented 6 years ago

Great, glad you are all here. I'm not sure if you will get emailed automatically when I submit this new post, so this is another test.

Some updates

  1. The lab computers have been updated with new R and R-studio versions, and they should now have the necessary packages installed.

  2. It is very important to remind students that any work they complete on the lab computers will be completely wiped off the computer at the end of each day. If they want to save their work, they need to take pre-cautions. For example, students should be encouraged to save their work on a thumb drive, or otherwise email it to themselves.

  3. Another option is that students can run R-studio in the cloud. They can sign up for a free account, and do everything through their web-browser. I made a new addition to the textbook that explains how to do this, https://crumplab.github.io/statisticsLab/software.html#r-studio-cloud. Note, I am currently uploading a screencast video to youtube, and will put that link in the textbook.

  4. I've decided on a standardized format for students to complete each of the labs. I will be adding information about this format here: https://crumplab.github.io/statisticsLab/software.html#how-to-complete-the-r-labs, along with another video here https://crumplab.github.io/statisticsLab/software.html#screencast-tutorial

All for now...

shira623 commented 6 years ago

Hi Matt,

Some success and a couple of questions.

I was able to do the entire lab, including generalization exercises.

1) I'm wondering how often you suggest we have students knit. What are the issues involved?

2) Each time I knit, a separate online window opened up with the data summary. I don't remember that happening before. Should it?

3) I had some difficulties understanding how some of the files were set up. For example, I wanted to redo the lab from scratch at one point, but every time I tried to start over with a new lab template, the one I had already worked on came up. I finally had to delete everything from the markdown link and start over. I think I don't fully understand the different files that are being set up when we start the lab using the template.

Thanks, Shira

CrumpLab commented 6 years ago
  1. How often to knit?

Good question. Here is the main issue with knitting. If you write a big document, and don't check that all of the code works as you go, then at the end it might not work, and you will spend lots of time trying to find the problems. So, I would suggest knitting once and a while throughout the process.

  1. Aaaa yes, this is is an issue with the following code:
library(summarytools)
view(dfSummary(nyc_films))

If you include this code in the R markdown document, then it will always make the extra window. This can be annoying. I think you can recommend that students DO NOT put this code in their R markdown document.

There is another way also, and a new thing to learn about R Markdown. For any code block in R Markdown you can turn it off. For example, below we insert eval=FALSE inside the braces. If you do this, it should stop the extra windows from popping up.

screen shot 2018-08-22 at 4 40 26 pm
  1. I think this last issue would be better discussed in person. Basically, the editor window shows any open files that you are working on. If you close R-studio and re-open it with the project file, then it will automatically open the files that were previously open. You can close a file by clicking on the x for any open file in the editor window. If you wanted to start again from a blank template, then you need to copy the blank template again from the template folder.
Kanderson1234 commented 6 years ago

Dr. Crump:

I was able to get through all of Lab 1, so I think I'm probably good to go on that front. The only point that I might bring up is that in addition to using Google, students might benefit from using rseek.org, as it is like Google but just for R.

Kyle

Get Outlook for Androidhttps://aka.ms/ghei36


From: Matt Crump notifications@github.com Sent: Wednesday, August 22, 2018 4:43:52 PM To: CrumpLab/statisticsLab Cc: Kyle Matthew Anderson; Comment Subject: Re: [CrumpLab/statisticsLab] Psyc 3400 (#18)

  1. How often to knit?

Good question. Here is the main issue with knitting. If you write a big document, and don't check that all of the code works as you go, then at the end it might not work, and you will spend lots of time trying to find the problems. So, I would suggest knitting once and a while throughout the process.

  1. Aaaa yes, this is is an issue with the following code:

library(summarytools) view(dfSummary(nyc_films))

If you include this code in the R markdown document, then it will always make the extra window. This can be annoying. I think you can recommend that students DO NOT put this code in their R markdown document.

There is another way also, and a new thing to learn about R Markdown. For any code block in R Markdown you can turn it off. For example, below we insert eval=FALSE inside the braces. If you do this, it should stop the extra windows from popping up.

[screen shot 2018-08-22 at 4 40 26 pm]https://user-images.githubusercontent.com/4038982/44489683-1ff83e80-a62a-11e8-9e75-c44b74334552.png

  1. I think this last issue would be better discussed in person. Basically, the editor window shows any open files that you are working on. If you close R-studio and re-open it with the project file, then it will automatically open the files that were previously open. You can close a file by clicking on the x for any open file in the editor window. If you wanted to start again from a blank template, then you need to copy the blank template again from the template folder.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/CrumpLab/statisticsLab/issues/18#issuecomment-415173166, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AolfDyRxklj-Gve-A1awC0TZBq9Iu1k8ks5uTcKIgaJpZM4WEwFW.

CrumpLab commented 6 years ago

Thanks Kyle! I'll put rseek.org into the resource links for this course

shira623 commented 6 years ago

Dr. Crump: I have been getting emails when we people post to github.

I have worked through labs 1 and 2 so I think I am good for now on that front. However, I still seem to be having difficulties with file management. A couple of times I have lost things (or thought I did and later managed to find them). I was hoping, at some point, that we could sit for a few minutes at a computer so that I can ask some questions and get a better handle on this.

Thanks, Shira

shira623 commented 6 years ago

I am trying to do lab 1 in R Cloud to see if it makes sense to just have all of my students do that. But I can't seem to knit. Every time I try, I get the following error message:

Error in nyc_films %>% group_by(Borough) %>% summarize(count_of_permits = length(Borough)): could not find function "%>%" Calls: ... handle -> withCallingHandlers ->withVisible ->eval -> eval execution halted

I tried taking out the particular line of code this was referring to and then got the exact same type of error about a different line.

CrumpLab commented 6 years ago

I have been able to successfully complete all of lab 1 in R-studio cloud, so at least for me it is working.

This error suggests that necessary packages were not installed. When you create an R-studio cloud account, you will need to install the packages that we use before running the lab.

For lab 1, this will include

data.table dplyr ggplot2 summarytools gapminder

Click the packages tab, then install, then type in the name of the package and install it. Rstudio cloud is a bit slow, it will look like nothing is happening. But, in 10-20 seconds you will see the package installing in the console.

The next time you log in to R-studio cloud, the packages will already be installed (if you are working in the same project where you installed the packages).

shira623 commented 6 years ago

That's interesting. It prompted me to install some of those packages and I did, but summarytools it just gave an error. Will try again.

On Fri, Aug 31, 2018 at 7:20 AM Matt Crump notifications@github.com wrote:

I have been able to successfully complete all of lab 1 in R-studio cloud, so at least for me it is working.

This error suggests that necessary packages were not installed. When you create an R-studio cloud account, you will need to install the packages that we use before running the lab.

For lab 1, this will include

data.table dplyr ggplot2 summarytools gapminder

Click the packages tab, then install, then type in the name of the package and install it. Rstudio cloud is a bit slow, it will look like nothing is happening. But, in 10-20 seconds you will see the package installing in the console.

The next time you log in to R-studio cloud, the packages will already be installed (if you are working in the same project where you installed the packages).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CrumpLab/statisticsLab/issues/18#issuecomment-417634536, or mute the thread https://github.com/notifications/unsubscribe-auth/Aole3H86gsAX6i8L94G5L1Dk17Z5G4zNks5uWRwPgaJpZM4WEwFW .

-- 917-723-1728 cell phone

CrumpLab commented 6 years ago

Strange indeed.

Did you get the error when trying to install summarytools?

Try re-installing summarytools from the packages tab. Make sure install dependencies is clicked on. If the installation doesn't work, that will be the main problem. Not sure why I would be able to install summarytools without an error...a mystery!