Package GrpString on CRAN

April 25, 2017
By

(This article was first published on Hui Tang's R Site, and kindly contributed to R-bloggers)

The R package GrpString is originally developed for analyzing and comparing groups of scanpaths in eye-tracking studies. However, it is ideal for string analysis in general, especially for quantifying differences between two groups of strings. Here is the flow chart showing most functions in the current version (0.3.1).

flow-chart3-300px

Some examples:

library(GrpString)
# Discover patterns in a string vector:
strs.vec <- c(“ABCDdefABCDa”, “def123DC”, “123aABCD”, “ACD13”, “AC1ABC”, “3123fe”)
CommonPatt(strs.vec, low = 30)
CommonPatt-result
# Compute transition entropy for each string:
stra.vec <- c(“ABCDdefABCDa”, “def123DC”, “A”, “123aABCD”, “ACD13”, “AC1ABC”, “3123fe”
TransEntropy(stra.vec)
entropy-result
# Statistical difference between two groups of strings:
strs1.vec <- c(“ABCDdefABCDa”, “def123DC”, “123aABCD”, “ACD13”, “AC1ABC”, “3123fe”)
strs2.vec <- c(“xYZdkfAxDa”, “ef1563xy”, “BC9Dzy35X”, “AkeC1fxz”, “65CyAdC”, “Dfy3f69k”)
ld.dif.vec <- StrDif(strs1.vec, strs2.vec, num_perm = 500, p.x = 0.025)

StrDif-result1

StrDif-hist

The package is available for download and install on CRAN, and you can find the latest version on GitHub.

To leave a comment for the author, please follow the link and comment on their blog: Hui Tang's R Site.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)