| elementprop | R Documentation |
Proportion of elements in a sequence
elementprop(S, target)
S |
character of length 1 or longer, contains the sequence |
target |
character of length 1: occurence of which element to model |
sequences cannot contain NAs at this point.
the porportion of target elements in S
elementprop("AAABBB", "B") #should be 0.5
elementprop("AAAB", "A") # should be 0.75
elementprop("AB", "A") # should be 0.5
S <- c("A", "A", "A", "B", "B", "B")
elementprop(S, target="A")
elementprop(S, target="X")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.