NispDiachr2: (Un)significative Changes in Main Dosmestic NISP between...

Description Usage Arguments Value See Also Examples

View source: R/NispDiachr2.R

Description

Plot histograms on Main Dosmestic NISP percent and Chi-square values between two consecutive periods

Usage

1
2
NispDiachr2(df,
           tax.color)

Arguments

df

a dataframe with a column period wich will be ordered (ex: 1,2,3,...), three columns for taxons 'BOTA', 'SUDO', 'OC' with numeric values percents

tax.color

a vector with colors of 'BOTA', 'SUDO', 'OC' taxons, by default: c('blue','red','green')

Value

create o ggplot and cowplot set of plots

See Also

chisq.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# load sample and plot histograms with Chi-square values showing (un)significant evolution 
nisp.df <- read.table(system.file("extdata", "nispdf.tsv", package = "aritmek4"))
g <- NispDiachr2(nisp.df)
## [1] "compare period: 1--2"
## [1] "0.06"
## [1] "compare period: 2--3"
## [1] "0"
## Warning message:
## In rbind(lhisto, lchi) :
##   number of columns of result is not a multiple of vector length (arg 2)
g

# append row to the dataset and replot
library(tidyverse)
nisp.df2 <- nisp.df 
g2 <- NispDiachr2(nisp.df2)
g2

zoometh/arithmetic documentation built on Nov. 19, 2020, 7:21 p.m.