Open hagenaue opened 4 years ago
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.
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.
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.
Also: Generally .pdfs are better output files than .png
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?
It should be alright to push the file with the different annotation - during the merge, we have the ability to pick and choose which changes we want to keep in the two versions.
On Mon, Jun 15, 2020 at 12:36 AM evrich17 notifications@github.com wrote:
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?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hagenaue/Angela_HRLR_StressEnrichData/issues/5#issuecomment-643897231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6V7ICZBAKQ32FYPCJLVQDRWWQLTANCNFSM4NZWFZRA .
-- Megan Hastings Hagenauer, Ph.D.
Assistant Research Scientist in the Molecular, Behavioral Neuroscience Institute Instructor in the Department of Psychology & Neuroscience Graduate Program University of Michigan-Ann Arbor
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.
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.