Open mattmalin opened 5 years ago
randomcolourise function added for dataframes
randomcolourise function added for dataframes
cool - where is this?
currently in the jn_dev branch
in the randomcolour.R file
I've introduced some warnings with the code update.
One is to do with the fact I've added an additional optional parameter to the randomcolour function to make it perform in a more similiar way to sample() or rnorm(). The code is fine but the documentation is now out of sync. It would be good to discuss if we want to put this change through before updating the docs to match.
Here is the full list of warnings Codoc mismatches from documentation object 'randomcolour': randomcolour Code: function(size = 1) Docs: function() Argument names in code not in docs: size
Package hyperref Warning: Option hyperindex' has already been used, (hyperref) setting the option has no effect on input line 377. Package hyperref Warning: Option
pagebackref' has already been used,
(hyperref) setting the option has no effect on input line 377.
LaTeX Font Warning: Font shape T1/zi4/m/it' undefined (Font) using
T1/zi4/m/n' instead on input line 3.
[3]) (/tmp/RtmpQQquGV/Rd2pdf38a63f156379/Rd2.aux)
Package rerunfilecheck Warning: File Rd2.out' has changed. (rerunfilecheck) Rerun to get outlines right (rerunfilecheck) or use package
bookmark'.
One of the reasons for making the function work like sample() is so that I could use it in a transmutate() function to randomise a dataframe.
Definitely don't want to put any changes through into master after a pull request without documentation matching, tests passing etc. I'd suggest splitting out branches so that e.g. the internal fixes small changes was one change, make a pull request, then work on another branch for features such as this one.
Agreed. Will start creating branches for different issues rather than a large generic dev branch.
Are you ok with the changes to randomcolour? If so I'll update the docs and test again before making a pull request to merge with master.
Btw do these warnings mean anything to you?
Package hyperref Warning: Option hyperindex' has already been used, (hyperref) setting the option has no effect on input line 377. Package hyperref Warning: Option pagebackref' has already been used, (hyperref) setting the option has no effect on input line 377.
LaTeX Font Warning: Font shape T1/zi4/m/it' undefined (Font) using T1/zi4/m/n' instead on input line 3. [3]) (/tmp/RtmpQQquGV/Rd2pdf38a63f156379/Rd2.aux) Package rerunfilecheck Warning: File Rd2.out' has changed. (rerunfilecheck) Rerun to get outlines right (rerunfilecheck) or use package bookmark'.
Want a function which returns the same data structure, but all values replaced with some random colours.