bbgghistplot: bbgghistplot

Description Usage Arguments Author(s) Examples

View source: R/reportfunctions.R

Description

Streamlines plotting of a histogramm using ggplot2

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
bbgghistplot(
  data,
  factor,
  uniquecounts,
  countslab = "Anzahl",
  xlabel = NULL,
  bin = 1,
  facet = NULL,
  dens = FALSE
)

Arguments

data

dataframe

factor

the column to count

uniquecounts

the column that determines the unique id

countslab

label of y axis default="Anzahl"

xlabel

label of x axis default=NULL

bin

bandwidth default=1

facet

if given the plot wil be printed as facets default=NULL

dens

if TRUE a density plot wil be performed default=FALSE

Author(s)

Stefan Bartels, email@biobits.eu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
PatID<-seq(1,50)
PatientWeight<-runif(50, min=40, max=100)
PatientWeightClass<-c("61-70","41-50","61-70","41-50","61-70","71-80",
                           "81-90","81-90","71-80","81-90","81-90","91-100","61-70")
PatientClass<-c("ClassA","ClassB","ClassB","ClassC","ClassA","ClassC",
                          "ClassA","ClassB","ClassA","ClassC","ClassA","ClassA","ClassA")
PatientClass2<-seq(1,50,50)
df<-as.data.frame(cbind(PatID,PatientWeight,PatientClass))
p1<-bbgghistplot(data=df,"PatientWeight","PatID",countslab="Anzahl",bin=10)
p1

## End(Not run)

biobits/bbreportr documentation built on Dec. 26, 2021, 6:43 a.m.