id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
R_base_tools/stringr.html3_7_0.txt | To duplicate individual strings, you can use ` str_dup() ` :
str_dup(x, c(2, 3))
#> [1] "abXdefabXdef" "ghXfjkghXfjkghXfjk" | |
R_base_tools/strings.html7_45_0.txt | 1. How would you match the literal string ` "$^$" ` ?
2. Given the corpus of common words in ` stringr::words ` , create regular expressions that find all words that: | |
R_base_tools/R_base_all_151_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# .Device: Lists of Open/Active Graphics Devices
## Description
A pairlist of the names of o... | |
R_base_tools/R_base_all_408_1.txt |
different compression scheme (and see ` [ resaveRdaFiles
](/link/resaveRdaFiles?package=base&version=3.6.2) ` for a way to do so from
within R ).
## Parallel compression
That ` file ` can be a connection can be exploited to make use of an external
parallel compression utility such as ` pigz ` ( [ http://zlib.net/... | |
R_base_tools/R_base_all_14_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# xtfrm: Auxiliary Function for Sorting and Ranking
## Description
A generic auxiliary funct... | |
R_base_tools/R_base_all_116_1.txt | value for other types of argument is
undocumented.
` list ` , ` is.list ` and ` is.pairlist ` are [ primitive
](/link/primitive?package=base&version=3.6.2) functions.
## References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.
## See Also
` [ vector ](/li... | |
R_base_tools/R_base_all_300_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# drop: Drop Redundant Extent Information
## Description
Delete the dimensions of an array w... | |
R_base_tools/R_base_all_212_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Arithmetic: Arithmetic Operators
## Description
These unary and binary operators perform a... | |
R_base_tools/R_base_all_167_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Sys.setenv: Set or Unset Environment Variables
## Description
` Sys.setenv ` sets environm... | |
R_base_tools/stringr.html4_28_0.txt | It’s worth mentioning also a number of functions that handle extra spaces
which can sometimes occur with manual data entries. ` str_trim ` will trim off
all leading and trailing white space, while ` str_squish ` will do that and
remove repeated spaces in the string
x <- " oops too much space "
... | |
R_base_tools/R_base_all_251_1.txt | n the user's workspace: see the
examples.) For this reason ` attach ` can lead to confusion.
One useful ‘trick’ is to use ` what = NULL ` (or equivalently a length-zero
list) to create a new environment on the search path into which objects can be
assigned by ` [ assign ](/link/assign?package=base&version=3.6.2) ` or ... | |
R_base_tools/strings.html6_0_0.txt | * Posit Cheatsheets
* Contributed Cheatsheets
* Translated Cheatsheets
* | |
R_base_tools/R_base_all_410_1.txt | ocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fcut&utm_source=r-docs&utm_medium=docs&utm_term=cut&utm_content=run_example_in_workspace)
# NOT RUN {
Z <- stats::rnorm(10000)
table(cut(Z, breaks = -6:6))
sum(table(cut(Z, breaks = -6:6, labels = FALSE)))
sum(graphics::hist(Z, breaks =... | |
R_base_tools/R_base_all_192_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Encoding: Read or Set the Declared Encodings for a Character Vector
## Description
Read or... | |
R_base_tools/R_base_all_154_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# factor: Factors
## Description
The function ` factor ` is used to encode a vector as a fac... | |
R_base_tools/R_base_all_225_1.txt | tions and ` [ Bessel
](/link/Bessel?package=base&version=3.6.2) ` for the real Bessel functions.
For the incomplete gamma function see ` [ pgamma
](/link/pgamma?package=base&version=3.6.2) ` .
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F... | |
R_base_tools/R_base_all_370_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# ns-topenv: Top Level Environment
## Description
Finding the top level ` [ environment
](/l... | |
R_base_tools/R_base_all_193_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# readBin: Transfer Binary Data To and From Connections
## Description
Read binary data from... | |
R_base_tools/stringr.html4_2_0.txt | ## Strings
What is a string? Mostly simply, a string is a sequence of characters in ` R `
enclosed between single or double quotes. It’s analogous to a number (or
numeric) in that a string, however long, is a single element in ` R ` . Also
like numbers, multiple strings can be collected together to make a vector | |
R_base_tools/R_base_all_380_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# scan: Read Data Values
## Description
Read data into a vector or list from the console or ... | |
R_base_tools/stringr.html4_69_0.txt | Question 6 Consider the following character vector and the ` str_subset `
function that is intending to return all of the strings with exactly 2 digits.
What does it actually return? Why do you think this is? Use ` str_view ` to
see what patterns are being matched
s <- c("1one", "22two", "333three", "44... | |
R_base_tools/R_base_all_409_1.txt | tacamp.com/)
| |
R_base_tools/R_base_all_90_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# system: Invoke a System Command
## Description
` system ` invokes the OS command specified... | |
R_base_tools/R_base_all_202_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# isS4: Test for an S4 object
## Description
Tests whether the object is an instance of an S... | |
R_base_tools/R_base_all_342_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# deparse: Expression Deparsing
## Description
Turn unevaluated expressions into character s... | |
R_base_tools/R_base_all_277_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# slotOp: Extract or Replace A Slot
## Description
Extract or replace the contents of a slot... | |
R_base_tools/R_base_all_301_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Comparison: Relational Operators
## Description
Binary operators which allow the compariso... | |
R_base_tools/R_base_all_185_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# UseMethod: Class Methods
## Description
R possesses a simple generic function mechanism w... | |
R_base_tools/R_base_all_414_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# maxCol: Find Maximum Position in Matrix
## Description
Find the maximum position for each ... | |
R_base_tools/strings.html7_83_0.txt | 1. For each of the following challenges, try solving it by using both a single regular expression, and a combination of multiple ` str_detect() ` calls.
1. Find all words that start or end with ` x ` . | |
R_base_tools/R_micropan_39_1.txt | tholog?package=micropan&version=1.0) ` .
## Examples
[ Run this code
](https://www.datacamp.com/datalab/preview?_tag=rdocs&rdocsPath=packages%2Fmicropan%2Fversions%2F1.0%2Ftopics%2FbClust&utm_source=r-docs&utm_medium=docs&utm_term=bClust&utm_content=run_example_in_datalab)
# Loading distance data in t... | |
R_base_tools/R_base_all_95_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# setTimeLimit: Set CPU and/or Elapsed Time Limits
## Description
Functions to set CPU and/o... | |
R_base_tools/R_base_all_109_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# unname: Remove ` names ` or ` dimnames `
## Description
Remove the ` [ names ](/link/names... | |
R_base_tools/stringr.html3_2_0.txt | 3. Locale sensitive operations whose operations will vary from locale to locale.
4. Pattern matching functions. These recognise four engines of pattern description. The most common is regular expressions, but there are three other tools. | |
R_base_tools/R_base_all_218_1.txt | s enabled on a byte compiled function then the interpreted
version of the function will be used until debugging is disabled.
## See Also
` [ debugcall ](/link/debugcall?package=base&version=3.6.2) ` for conveniently
debugging methods, ` [ browser ](/link/browser?package=base&version=3.6.2) `
notably for its ‘ _comma... | |
R_base_tools/R_micropan_23_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# bDist: Computes distances between sequences based on BLAST results
## Description
Read... | |
R_base_tools/strings.html7_5_0.txt | This chapter will focus on the stringr package for string manipulation,
which is part of the core tidyverse.
library(tidyverse) | |
R_base_tools/R_base_all_198_4.txt | ost likely be all or some of the input up to the error.
It may be possible to deduce the current native encoding from ` [
Sys.getlocale ](/link/Sys.getlocale?package=base&version=3.6.2) ("LC_CTYPE") `
, but not all OSes record it.
## Blocking
Whether or not the connection blocks can be specified for file, url (defa... | |
R_base_tools/strings.html7_16_0.txt | To combine two or more strings, use ` str_c() ` :
str_c("x", "y")
#> [1] "xy"
str_c("x", "y", "z")
#> [1] "xyz" | |
R_base_tools/R_micropan_23_1.txt | w?_tag=rdocs&rdocsPath=packages%2Fmicropan%2Fversions%2F1.0%2Ftopics%2FbDist&utm_source=r-docs&utm_medium=docs&utm_term=bDist&utm_content=run_example_in_datalab)
Powered by [ DataCamp ](https://www.datacamp.com/)
| |
R_base_tools/R_base_all_392_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# formatDL: Format Description Lists
## Description
Format vectors of items and their descri... | |
R_base_tools/stringr.html3_31_0.txt | By convention, ` "" ` is treated as ` boundary("character") ` :
str_split(x, "")
#> [[1]]
#> [1] "T" "h" "i" "s" " " "i" "s" " " "a" " " "s" "e" "n" "t" "e" "n" "c" "e" "."
str_count(x, "")
#> [1] 19 | |
R_base_tools/R_base_all_8_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# formals: Access to and Manipulation of the Formal Arguments
## Description
Get or set the ... | |
R_base_tools/R_base_all_0_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# as.environment: Coerce to an Environment Object
## Description
A generic function coercing... | |
R_base_tools/R_base_all_189_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# La_version: LAPACK Version
## Description
Report the version of LAPACK in use.
## Usage
... | |
R_base_tools/R_base_all_324_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Vectorize: Vectorize a Scalar Function
## Description
` Vectorize ` creates a function wra... | |
R_base_tools/R_base_all_254_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# .bincode: Bin a Numeric Vector
## Description
Bin a numeric vector and return integer code... | |
R_base_tools/R_base_all_61_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# which: Which indices are TRUE?
## Description
Give the ` TRUE ` indices of a logical objec... | |
R_base_tools/R_base_all_404_1.txt | ers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.
## See Also
the convenience functions ` [ by ](/link/by?package=base&version=3.6.2) ` and
` [ aggregate ](/link/aggregate?package=base&version=3.6.2) ` (using ` tapply
` ); ` [ apply ](/link/apply?package=base&version=3.6.2) ` , ` [ l... | |
R_base_tools/R_base_all_136_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# function: Function Definition
## Description
These functions provide the base mechanisms f... | |
R_base_tools/R_base_all_309_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# extSoftVersion: Report Versions of Third-Party Software
## Description
Report versions of ... | |
R_base_tools/R_base_all_227_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# row.names: Get and Set Row Names for Data Frames
## Description
All data frames have a row... | |
R_base_tools/strings.html7_84_0.txt | 2. Find all words that start with a vowel and end with a consonant.
3. Are there any words that contain at least one of each different vowel? | |
R_base_tools/R_base_all_230_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# kronecker: Kronecker Products on Arrays
## Description
Computes the generalised kronecker ... | |
R_base_tools/R_base_all_140_1.txt | [ DataCamp ](https://www.datacamp.com/)
| |
R_base_tools/R_base_all_186_1.txt | results
with R version 3.6.0.
CRAN package sampling for other methods of weighted sampling without
replacement.
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fsample&utm_source=r-docs&utm_medium=docs&utm_term=sample&utm_c... | |
R_base_tools/R_base_all_213_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Foreign-internal: Internal Versions of the Foreign Function Interface
## Description
Inter... | |
R_base_tools/R_base_all_347_2.txt | acter strings or character vectors are coerced
to character if possible.
Each of these functions operates in one of three modes:
1. ` fixed = TRUE ` : use exact matching.
2. ` perl = TRUE ` : use Perl-style regular expressions.
3. ` fixed = FALSE, perl = FALSE ` : use POSIX 1003.2 extended regular expressio... | |
R_base_tools/strings.html7_12_0.txt |
x <- "\u00b5"
x
#> [1] "µ"
Multiple strings are often stored in a character vector, which you can create
with ` c() ` : | |
R_base_tools/strings.html7_41_0.txt | By default, regular expressions will match any part of a string. It’s often
useful to anchor the regular expression so that it matches from the start or
end of the string. You can use:
* ` ^ ` to match the start of the string.
* ` $ ` to match the end of the string. | |
R_base_tools/R_base_all_217_1.txt | s.
## References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.
Knuth, D. E. (1998) _The Art of Computer Programming, Volume 3: Sorting and
Searching._ 2nd ed. Addison-Wesley.
## See Also
` [ sort ](/link/sort?package=base&version=3.6.2) ` , ` [ rank
](/lin... | |
R_base_tools/R_base_all_29_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# MathFun: Miscellaneous Mathematical Functions
## Description
` abs(x) ` computes the absol... | |
R_base_tools/R_base_all_271_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# substr: Substrings of a Character Vector
## Description
Extract or replace substrings in a... | |
R_base_tools/R_base_all_129_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# backsolve: Solve an Upper or Lower Triangular System
## Description
Solves a triangular sy... | |
R_base_tools/R_base_all_355_1.txt | code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FshQuote&utm_source=r-docs&utm_medium=docs&utm_term=shQuote&utm_content=run_example_in_workspace)
Powered by [ DataCamp ](https://www.datacamp.com/)
| |
R_base_tools/strings.html7_111_0.txt |
x <- "This is a sentence. This is another sentence."
str_view_all(x, boundary("word"))
#> [1] │ <This> <is> <a> <sentence>. <This> <is> <another> <sentence>.
str_split(x, " ")[[1]]
#> [1] "This" "is" "a" "sentence." "" "This"
#> [7] "is" ... | |
R_base_tools/R_base_all_264_1.txt | ` for positive numbers ,
` " " `
if the first character is not a sign, the space character ` " " ` will be used
instead.
` "#" `
specifies “an alternative output form”, specifically depending on ` format ` .
` "'" `
on some platform--locale combination, activates “thousands' grouping” for
decima... | |
R_base_tools/strings.html6_14_0.txt | * ` str_subset(string, pattern, negate = FALSE) ` : Return only the strings that contain a pattern match.
str_subset(fruit, "p")
* ` str_extract(string, pattern) ` : Return the first pattern match found in each string, as a vector. Also ` str_extract_all() ` to return every pattern match.
... | |
R_base_tools/R_base_all_218_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# debug: Debug a Function
## Description
Set, unset or query the debugging flag on a functio... | |
R_base_tools/R_base_all_381_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# sys.parent: Functions to Access the Function Call Stack
## Description
These functions pro... | |
R_base_tools/R_base_all_393_1.txt | nds which support it, the commands history is read from the file
specified by the environment variable ` R_HISTFILE ` (default ` .Rhistory ` in
the current directory) unless \--no-restore-history or \--no-restore was
specified.
The command-line option \--vanilla implies \--no-site-file , \--no-init-
file , ... | |
R_base_tools/strings.html7_51_0.txt | #### 14.3.3.1 Exercises
1. Create regular expressions to find all words that: | |
R_base_tools/R_base_all_187_1.txt | Internals’ manual for details of the format used.
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fserialize&utm_source=r-docs&utm_medium=docs&utm_term=serialize&utm_content=run_example_in_workspace)
# NOT RUN {... | |
R_base_tools/R_base_all_375_1.txt | erences
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ .
Wadsworth & Brooks/Cole.
Unicode Standard Annex #11: _East Asian Width._ [
http://www.unicode.org/reports/tr11/ ](http://www.unicode.org/reports/tr11/)
## See Also
` [ strwidth ](/link/strwidth?package=base&version=3.6.2) ` givin... | |
R_base_tools/R_base_all_120_1.txt |
# example from boxplot:
with(ToothGrowth, {
boxplot(len ~ dose, boxwex = 0.25, at = 1:3 - 0.2,
subset = (supp == "VC"), col = "yellow",
main = "Guinea Pigs' Tooth Growth",
xlab = "Vitamin C dose mg",
ylab = "tooth length", ylim = c(0,... | |
R_base_tools/R_base_all_216_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# is.R: Are we using R, rather than S?
## Description
Test if running under R .
## Usage... | |
R_base_tools/R_base_all_211_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Defunct: Marking Objects as Defunct
## Description
When a function is removed from R it ... | |
R_base_tools/R_base_all_198_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# connections: Functions to Manipulate Connections (Files, URLs, ...)
## Description
Functio... | |
R_base_tools/R_base_all_184_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# strrep: Repeat the Elements of a Character Vector
## Description
Repeat the character stri... | |
R_base_tools/R_base_all_362_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# polyroot: Find Zeros of a Real or Complex Polynomial
## Description
Find zeros of a real o... | |
R_base_tools/R_base_all_298_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# files2: Manipulation of Directories and File Permissions
## Description
These functions pr... | |
R_base_tools/R_base_all_349_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# attributes: Object Attribute Lists
## Description
These functions access an object's attri... | |
R_base_tools/R_base_all_185_1.txt | ual) arguments.
4. Fix up the argument list to be the arguments of the call matched to the formals of the method.
` .Generic ` is a length-one character vector naming the generic function.
` .Method ` is a character vector (normally of length one) naming the method
function. (For functions in the group generic `... | |
R_base_tools/R_base_all_349_1.txt | utes(x) <- list(mycomment = "really special", dim = 3:2,
dimnames = list(LETTERS[1:3], letters[1:5]), names = paste(1:6))
x # dim(), but not {dim}names
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbas... | |
R_base_tools/R_base_all_264_2.txt | n needed”_ : when `
zero.print ` is not ` NULL ` , ` drop0trailing ` is true, or one of ` big.mark
` , ` small.mark ` , or ` decimal.mark ` is not at default.)
If you set ` format ` it overrides the setting of ` mode ` , so `
formatC(123.45, mode = "double", format = "d") ` gives ` 123 ` .
The rendering of scientific... | |
R_base_tools/R_base_all_222_1.txt | "LC_COLLATE" `
, ` "LC_CTYPE" ` , ` "LC_MONETARY" ` and ` "LC_TIME" ` .
Attempts to set an invalid locale are ignored. There may or may not be a
warning, depending on the OS.
Attempts to change the character set (by ` Sys.setlocale("LC_CTYPE", ) ` , if
that implies a different character set) during a session may not ... | |
R_base_tools/R_base_all_293_1.txt | object via a connection, which will be opened as needed.
con <- gzfile(fil)
readRDS(con)
close(con)
## Less convenient ways to restore the object
## which demonstrate compatibility with unserialize()
con <- gzfile(fil, "rb")
identical(unserialize(con), women)
close(con)
con <- ... | |
R_base_tools/R_base_all_419_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# sum: Sum of Vector Elements
## Description
` sum ` returns the sum of all the values prese... | |
R_base_tools/R_micropan_36_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ micropan (version 1.0 ) ](/packages/micropan/versions/1.0)
# plot.Rarefac: Plotting and printing ` Rarefac ` objects
## Description
Generic functio... | |
R_base_tools/R_base_all_105_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# memCompress: In-memory Compression and Decompression
## Description
In-memory compression ... | |
R_base_tools/stringr.html4_61_0.txt |
s <- c("a1", "b2", "c3", "d4")
# Does not END in 1 or 3
str_subset(s, pattern = "[^13]$")
## [1] "b2" "d4"
s <- c("dog^cat", "dogacat")
str_detect(s, "[d^c]")
## [1] TRUE TRUE
Question 5 The following code chunk takes the rownames from the ` USA... | |
R_base_tools/strings.html7_31_0.txt | 5. What does ` str_trim() ` do? What’s the opposite of ` str_trim() ` ?
6. Write a function that turns (e.g.) a vector ` c("a", "b", "c") ` into the string ` a, b, and c ` . Think carefully about what it should do if given a vector of length 0, 1, or 2. | |
R_base_tools/R_base_all_131_2.txt | onth, useNA = "always"))
with(airquality,
table(OzHi = Ozone > 80, addNA(Month)))
# }
Run the code above in your browser using [ DataCamp Workspace
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Ftable&utm_source=r-docs&utm_medium=doc... | |
R_base_tools/stringr.html4_32_0.txt |
s <- c("a", "b", "c")
s
## [1] "a" "b" "c"
str_c(s, collapse = "")
## [1] "abc"
str_c(s, collapse = ", ")
## [1] "a, b, c"
We have already seen a form of string splitting with the ` separate ` function
in ` dplyr ` . With simple st... | |
R_base_tools/R_base_all_209_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# Quotes: Quotes
## Description
Descriptions of the various uses of quoting in R .
## Ar... | |
R_base_tools/strings.html6_46_0.txt | Learn more at stringr.tidyverse.org .
Updated: 2023-07. | |
R_base_tools/strings.html7_7_0.txt |
string1 <- "This is a string"
string2 <- 'If I want to include a "quote" inside a string, I use single quotes'
If you forget to close a quote, you’ll see ` + ` , the continuation character: | |
R_base_tools/strings.html7_132_0.txt | ## On this page
* 14 Strings
* 14.1 Introduction
* 14.1.1 Prerequisites
* 14.2 String basics
* 14.2.1 String length
* 14.2.2 Combining strings
* 14.2.3 Subsetting strings
* 14.2.4 Locales
* 14.2.5 Exercises
* 14.3 Matching patterns with regular expressions
* 14.... | |
R_base_tools/R_base_all_268_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# readChar: Transfer Character Strings To and From Connections
## Description
Transfer chara... | |
R_base_tools/stringr.html4_56_0.txt |
s <- c("dogs$(@!", "^&*are", ";[co(]!ol")
# This removes "punctuation"
s <- str_replace_all(s, pattern = "[:punct:]", "")
s
## [1] "dogs$" "^are" "cool"
# This removes "symbols"
s <- str_replace_all(s, pattern = "[:symbol:]", "")
s
## [1] "dog... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.