randomcolour / randomcolourr

An R package generating random colour examples across R functionality.
1 stars 0 forks source link

randomcolourise any input e.g. vectors, data.frames/tibble #28

Open mattmalin opened 5 years ago

mattmalin commented 5 years ago

Want a function which returns the same data structure, but all values replaced with some random colours.

jn8 commented 4 years ago

randomcolourise function added for dataframes

mattmalin commented 4 years ago

randomcolourise function added for dataframes

cool - where is this?

jn8 commented 4 years ago

currently in the jn_dev branch

jn8 commented 4 years ago

in the randomcolour.R file

jn8 commented 4 years ago

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: Optionpagebackref' 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) usingT1/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 packagebookmark'.

jn8 commented 4 years ago

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.

mattmalin commented 4 years ago

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.

jn8 commented 4 years ago

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.

jn8 commented 4 years ago

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'.