string_magic's operations: The reference2 years ago
Basic string operations | s, S, split, Split: Split strings | c, C, collapse, Collapse: Collapse strings | extract, x, X: Extract patterns | r, R, replace: Replace patterns | clean: Clean string patterns | get: Get selected strings | is: Detect patterns in strings | which: Get the index of the strings containing a pattern | Operations changing the length or the order | first: Keep only the first elements | K: Keep only the first elements (alternative) | last: Keep only the last elements | sort: Sort the vector | dsort: Sort the vector in decreasing order | rev: Reverse the vector | unik: Keep only unique elements | table: Attach unique elements to their frequencies | each: Repeat each elements of the vector | times: Repeats the vector | rm: Remove specific values | nuke: Remove all value | insert: Insert a character string | dp, deparse: Deparse an object | Formatting operations | lower: Change the case | upper: Change the case | title: Change the case | ws: Normalize white spaces | tws: Trim white spaces | q, Q, bq: Add various type of quotes | format, Format: Format the values with base::format | %: Apply sprintf formatting | stopwords: Remove stop words | ascii: Turn the string to ASCII | round, signif, r0-r6, s0-s6: Formatting numbers | n, N: Formatting integers | nth, Nth: Numbered position | ntimes, Ntimes: Number of times | firstchar, lastchar: Keep only the first, last characters | k, shorten, Shorten: Shortens character strings | fill, align, width: Fill character strings | paste, append: Append text | join: Join lines | escape: Escape special characters | Other operations | num: Convert to numeric | enum: Create an enumeration | len, Len: Formatted length | swidth: Add newlines to force the string to fit a given width | difftime: Formatted time difference
stringmagic 1.2.0Laurent R. Bergéref_operations.rmd