Learn R Programming

vanddraabe (version 1.1.1)

getResTypeCounts: Get ResType Counts

Description

Counts the number of ResType within the provided string.

Usage

getResTypeCounts(res.types)

Arguments

res.types

A vector of strings containing a combination of the 20 ResTypes.

Value

a vector of numbers indicating the counts of each ResType. The vector is ordered based on the names.ResTypes with ResTypes not included assigned a value of zero (0).

Details

This is a wrapper for the base::table() function. The vector of ResType are passed to the function, non-standard ResType are removed, the ResType are counted, and the counts are ordered based on the names.ResTypes constant.

NOTE: This is a non-public function.

See Also

Other utilities: ConservationSet, DetermineChainsOfInterest, ExtractFileTimeStamp, ExtractPDBids, FileTimeStamp, HasXWaters, Nearby, ProtHetWatIndices, RescaleValues, RetainChainsOfInterest, ReturnPDBfullPath, StandardizeAsparticAcidNames, StandardizeCysteineNames, StandardizeGlutamicAcidNames, StandardizeHistidineNames, StandardizeLysineNames, TimeSpan, UniqueAtomHashes, aaStandardizeNames, getAtomTypeCounts, res2xyz, resAtomType2AtomClass, write.basic.pdb, write.conservedWaters.pdb

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
  set.seed(13)
  num.ResTypes <- sample(1:10, 20, replace = TRUE)
  res.types <- rep(names.residues, num.ResTypes)
  getResTypeCounts(res.types)
  # [1] 8  3  5 10  6  6  4  8  3  1 10  7  7  5  1  6  8  1  1  4
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab