mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
helper functions for nivce labels and FreesearchR color palette
This commit is contained in:
parent
91e2772a86
commit
fde1a50140
4 changed files with 84 additions and 2 deletions
20
man/FreesearchR_palette.Rd
Normal file
20
man/FreesearchR_palette.Rd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/theme.R
|
||||
\name{FreesearchR_palette}
|
||||
\alias{FreesearchR_palette}
|
||||
\title{Use the FreesearchR colors}
|
||||
\usage{
|
||||
FreesearchR_palette(n)
|
||||
}
|
||||
\arguments{
|
||||
\item{n}{number of colors}
|
||||
}
|
||||
\value{
|
||||
character vector
|
||||
}
|
||||
\description{
|
||||
Use the FreesearchR colors
|
||||
}
|
||||
\examples{
|
||||
FreesearchR_palette(n=7)
|
||||
}
|
||||
23
man/unique_short.Rd
Normal file
23
man/unique_short.Rd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/visual_summary.R
|
||||
\name{unique_short}
|
||||
\alias{unique_short}
|
||||
\title{Create unique short names of character vector items based on index}
|
||||
\usage{
|
||||
unique_short(data, max = 15)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{character vector}
|
||||
|
||||
\item{max}{maximum final name length}
|
||||
}
|
||||
\value{
|
||||
character vector
|
||||
}
|
||||
\description{
|
||||
The function will prefer original names, and only append index to long
|
||||
strings.
|
||||
}
|
||||
\examples{
|
||||
c("kahdleidnsallskdj", "hej") |> unique_short()
|
||||
}
|
||||
28
man/visual_summary.Rd
Normal file
28
man/visual_summary.Rd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/visual_summary.R
|
||||
\name{visual_summary}
|
||||
\alias{visual_summary}
|
||||
\title{Ggplot2 data summary visualisation based on visdat::vis_dat.}
|
||||
\usage{
|
||||
visual_summary(data, legend.title = "Data class", ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data}
|
||||
|
||||
\item{...}{optional arguments passed to data_summary_gather()}
|
||||
}
|
||||
\value{
|
||||
ggplot2 object
|
||||
}
|
||||
\description{
|
||||
Ggplot2 data summary visualisation based on visdat::vis_dat.
|
||||
}
|
||||
\examples{
|
||||
data_demo <- mtcars
|
||||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
visual_summary(data_demo)
|
||||
visual_summary(data_demo, palette.fun = scales::hue_pal())
|
||||
visual_summary(dplyr::storms)
|
||||
visual_summary(dplyr::storms, summary.fun = data_type)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue