Closed vbaliga closed 4 years ago
OK awesome thanks for taking care of these.
Just a minor thing I noticed just now:
z_vector
and x_vector
, but we'll be required to have them -- we're getting errors in generating docs. Can you please add these in?After that, I think we're in great shape for this script. Will jump into another one now!
Spoke too soon hahah. There is one more minor thing:
@examples
roxygen tag but there is no supplied example. Can you either add an example or just delete this line entirely? We can always add in an example later on.complete! I will close this issue then. 1 down many to go!
This is feedback for
mathematicalfunctions.R
only. I am going to make my way through all the.R
scripts over the next few days, and I'll make separate entries for the other function scripts. I elected to start with this one since looking at the underlying math will hopefully help me understand other functions.General comment for
@return
section of all functions: A general practice that people do is to have the first few words of this section describe the type of object that is created in the R environment by the function -- if it's a vector, matrix, list, etc. So, for example, line 13 could become "a numeric vector with value1
ifi
andj
are equal or0
if they are not".Line 5: Sorry if I've misunderstood, but I've heard this called the Kroenecker delta. After googling "Dirac delta" it seems like that refers to something else? This wiki page seems to match what your dirac function does. So should this be renamed
kroenecker_delta()
or something along those lines?Line 35: Can the roxygen comment be a little more specific about what kind of rotation matrix is generated? Cosine?
Line 70: The example for
calc_univec()
doesn't look right, asunit_vector()
isn't an exported function. Did you mean:output = calc_univec(c(2,6,5)
here?Line 122: Some of the parameters are missing descriptions
Lines 408 and 410: I am having trouble understanding the basis for using the fraction 1/8 as feather locations are determined. I'm totally on board with assuming feathers will be evenly distributed across their corresponding bones. But the 1/8 thing eludes me -- why isn't it
1/no_prim
or1/(no_prim - 2)
? Also, would it be robust to cases where primary count isn't 10?