Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputting Histograms #5

Open
hagenaue opened this issue Jun 9, 2020 · 7 comments
Open

Outputting Histograms #5

hagenaue opened this issue Jun 9, 2020 · 7 comments

Comments

@hagenaue
Copy link
Owner

hagenaue commented Jun 9, 2020

Currently the histograms plotted in "2_TransformingData.R" lack formatting and are not actually outputted to files. Since many of our variables are not normally-distributed, we will eventually need these histograms outputted for documentation (to justify our analysis decisions) and to potentially include in the supplementary material for the paper.

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 9, 2020

The most efficient way to do this would probably be to create a general histogram-outputting function (with file type, plotting parameters, colors, x- and y- labels, etc), and then apply that function to every continuous variable in the dataset using a for loop.

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 9, 2020

However, the easiest place to start might be to get the histogram outputting code looking good for one variable (e.g., Corticosterone) regarding file type, plotting parameters, colors, x- and y- labels, etc, and then figure out how to generalize it.
Since you already made histograms as part of your UROP projects, you may be able to adapt the code that you already wrote and/or steal aspects of code from other students.

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 9, 2020

Example code to cannibalize:
"for (i in 1:length(SubjectContinuousVariables[1,])){
png(paste(paste("14 Histogram of", colnames(SubjectContinuousVariables)[i], sep=" "), "png", sep="."))
hist(SubjectContinuousVariables[,i], col=i+1)
dev.off()
}
Note - these histograms are totally ugly.

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 9, 2020

Also: Generally .pdfs are better output files than .png

@evrich17
Copy link
Contributor

Hi Megan or Liam, I was hoping one of you could help me with this:

I tried to do a pull in R so that I could get the updated code that Liam had functionalized, but this is what keeps popping up:

C:/Program Files/Git/bin/git.exe pull
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.

I am not sure what merge it is talking about; I think the problem is that I had made a few annotation changes that I never pushed and Megan has since edited them--I don't want to change what Megan has written at all and whatever I had added is probably already covered and not necessary to push, but I can't figure out how to get rid of it so that I can pull the rest of the code. Do either of you know how to fix this problem other than going through and changing everything by hand?

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 15, 2020 via email

@hagenaue
Copy link
Owner Author

hagenaue commented Jun 23, 2020

It would be nice if we could also output a version of the histograms for the social defeat time series variables that combines all 4 days worth of data into a single histogram plot. The columns for these variables (combined across all 4 days) can be found in the DefeatDays_LongVersion data frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants