View Code? Open in Web Editor
NEW
A set of more than >130 productivity functions: vector, matrix, list manipulations and math. Used by MarkdownReports, ggExpress, SeuratUtils, etc.
Home Page: https://vertesy.github.io/CodeAndRoll2
License: GNU General Public License v3.0
codeandroll2's People
Contributors
Watchers
codeandroll2's Issues
As of 2021 it is a major task to format this library into a proper package
I tried installing CodeAndRoll2 with
require("devtools")
devtools::install_github(repo = "vertesy/CodeAndRoll2")
but got the following error:
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref master
Did you spell the repo owner (vertesy
) and repo name (CodeAndRoll2
) correctly?
If spelling is correct, check that you have the required permissions to access the repo.
This only worked once I installed it from the main branch and not the master. Might be useful in the future for others:
devtools::install_github(repo = "vertesy/CodeAndRoll2", ref = 'main')
Core functionality
Move to StringsAndPaths
StringsAndPath operations
helpers for Markdownreports and ggExpress
Move to FileWriter or IO
Input Output
write.simple functions
Move to Rocinante
Anything not core and StringsAndPaths
No
it should handle tibble or raise an error
any.duplicated() is not found, even if part of the package.
Found in NAMESPACE, and in man
. Mistery.
Description
as.named.vector() on a DF column gives back a vector much longer than the original dimensions
Expected Behavior
complain if not uni dimensional?
Buggy Behavior
> l(as.named.vector(obj @ meta.data [ , assignments ]))
[1 ] 35860
> dim((obj @ meta.data [ , assignments ]))
[1 ] 7172 5
Fun
as.named.vector <- function (df_col , WhichDimNames = 1 )
{
namez = dimnames(df_col )[[WhichDimNames ]]
if (is.list(df_col ) & ! is.data.frame(df_col )) {
namez = names(df_col )
}
vecc = as.vector(unlist(df_col ))
names(vecc ) = namez
return (vecc )
}
< bytecode : 0x7fd41b108ba8 >
< environment : namespace : CodeAndRoll2 >