Is the purpose of the project is clear?
Purpose of the project is clearly described in the read me file.
Is it clear what each file in the project is intened for?
Shark full code has all of the analyses. Not clear yet what the other scripts are for in the repository, but as I go through the full code it should become clear. I never really looked at the other scripts. Maybe you could create a data maniupulation script where you subset your data separate from your analyses. Because the full script contains a lot of subsetting and repititions that wouldn't be necessary that way.
It is clear how the various files interact?
n/a since I only used one markdown to run through analyses
Is it clear what the purpose if of specific sections of code?
yes, you have separate chunks that are well titled. However, it might be helpful to describe why you are doing specific analyses such as PCA and RDA a little more.
How well commented is the code on a scale of 1(no comments) to 10(very well commented).
7 You have good comments describing all of your steps. I feel like a little more comments about results of each figure analysis would be helpful. This could also help lead you from one analysis to the other.
How can the purposes of the project and files be improved?
separating analyses and data manipulation files; limit repeated lines such as 33 &34 and 231 &232; avoid printing out data such as in line 175
Organization
Is the project organized such that you can intuit where the data,
scripts, and output files are stored?
yes since it is all in one txt file and one markdown. However, separating out some of it might be helpful.
Approximately how much time did it take you to understand the work flow
in the project?
one hour
How well defined are code chunks in the project?
fairly well. Chunks are titled and contain lots of commenting. However, some understanding of why you go from PCA to RDA and other analyses would be helpful.
How can organization be improved?
I think separatng out some of your scripts would make it easier to follow. It is hard to tell what exactly the pca and rda are telling you. If you separate them out it might be more clear what exactly the results are for the different analyses.
Functionality
Does the code appear to advance the purpose of the project?
Yes it does appear to explain differences in tooth shape for three different species. However, I think it would be helpful to explain why you are running RDA, PCA, and LDA and what in particular each of those explains in terms of the tooth shape.
Do the existing components of the project appear to function?
For the most part. I had a few lines that I couldn't get to run.
They are: Line 253, 258, 315-319, 424.
A few other questions I had about are your code are as follows:
For your function, I suggest printing "Converting input to a matrix" instead of listing it as a warning
I don't quite understand what you are doing in lines 252- 260. I don't think you can say anything about species from this?
In line 538 is this acctually the mean?
For the last part, how are you saying that the 4th landmark contributes most to tooth shape? Are you saying this because it has the highest standard deviation according to the apply(sd) you ran? If so, I don't think you can quite say that. That is looking at how much variance there is between all of the fourth landmarks, not comparing all of the variation between landmarks.
How can the author improve functionality of code?
More description about Mahalanobis distance would be helpful. Avoid repitition and separate out scripts.
Specific File Comments
README.md
(for example) Easy to understand, but consider adding a code licence...
General Review Checklist
Purpose
Organization
Functionality
Specific File Comments