Package GrpString on CRAN

[This article was first published on Hui Tang's R Site, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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 about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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)