rysgran.hist: Histograms of Grain Size Data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

rysgran.hist generates histograms of weight percentage of phi classes for each grain size sample

Usage

1

Arguments

data

a data matrix with grain size samples. Must contain the first line of grain size classes (logarithmic or geometric scale), each following line should contain the weights of a sample. No header should be used

subset

Vector whit factor to subset the histograms. Default is NULL

which

factor from subset object argument. Default is NULL

ordered

logical. If TRUE the panels order is on the order of row in tab, if FALSE the order is alphabetical. Default is TRUE

Details

rysgran.hist is the only function in rysgran package which uses the package lattice. Users familiarized with lattice will have no problem using this function

Value

return multiples histograms

Author(s)

Leonardo Sandrini (leonardosandrini@gmail.com)
Eliandro R. Gilbert (eliandrogilbert@gmail.com)

See Also

rysgran.plot , gran.stats , rysgran.ternary , class.percent , lattice

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(rysgran)
data(camargo2001)
data(sed.phi)

#histograms

rysgran.hist(camargo2001)


#histograms separated by factors

env<- rep(c("River","Tidal Flat","Subtidal","Beach"),each=10)
rysgran.hist(sed.phi, subset = env , which= "Subtidal")


#Making it more attractive

env<- rep(c("River","Tidal Flat","Subtidal","Beach"),each=10)
hist <- rysgran.hist(sed.phi, subset = env , which= "Subtidal")
hist

hist.up <- update(hist, aspect = .4,
    scales=list(x=list(cex=.7),y=list(cex=.7)),
    layout = c(2,5),
    between= list(x = c(0.2), y = c(0.2)),
    ylab = "Frequency",
    xlab = expression(paste(phi)),
    strip = strip.custom(bg = "lightblue"),
    col = "red",
    main="Histogram")
hist.up

rysgran documentation built on May 1, 2019, 8:06 p.m.