id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
R_base_tools/R_base_all_379_1.txt
.6.2) . _ R has no single precision data type. All real numbers are stored in double precision format _ . The functions ` as.single ` and ` single ` are identical to ` as.double ` and ` double ` except they set the attribute ` Csingle ` that is used in the ` [ .C ](/link/.C?package=base&version=3.6.2) ` and ` [ .Fort...
R_base_tools/R_base_all_160_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) # Memory-limits: Memory Limits in R ## Description R holds objects it is using in virtual m...
R_base_tools/R_base_all_22_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) # pretty: Pretty Breakpoints ## Description Compute a sequence of about ` n+1 ` equally spac...
R_base_tools/R_base_all_214_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) # prmatrix: Print Matrices, Old-style ## Description An earlier method for printing matrices...
R_base_tools/R_base_all_290_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) # showConnections: Display Connections ## Description Display aspects of [ connections ](/li...
R_base_tools/stringr.html3_19_0.txt
* ` str_count() ` counts the number of matches: # How many phone numbers in each string? str_count(strings, phone) #> [1] 0 1 1 2 * ` str_locate() ` locates the first position of a pattern and returns a numeric matrix with columns start and end. ` str_locate_all() ` locates all matches, ret...
R_base_tools/R_micropan_39_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) # bClust: Clustering sequences based on pairwise distances ## Description Sequences are ...
R_base_tools/R_base_all_158_2.txt
. ## References Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S Language_ . Wadsworth & Brooks/Cole. ## See Also ` [ demo ](/link/demo?package=base&version=3.6.2) ` which uses ` source ` ; ` [ eval ](/link/eval?package=base&version=3.6.2) ` , ` [ parse ](/link/parse?package=base&version=3.6.2) `...
R_base_tools/R_base_all_241_1.txt
ocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdiag&utm_source=r-docs&utm_medium=docs&utm_term=diag&utm_content=run_example_in_workspace) Powered by [ DataCamp ](https://www.datacamp.com/)
R_base_tools/R_base_all_98_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) # any: Are Some Values True? ## Description Given a set of logical vectors, is at least one ...
R_base_tools/R_base_all_223_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: Row Indexes ## Description Returns a matrix of integers indicating their row number i...
R_base_tools/R_base_all_347_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) # grep: Pattern Matching and Replacement ## Description ` grep ` , ` grepl ` , ` regexpr ` ,...
R_base_tools/R_base_all_194_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) # agrep: Approximate String Matching (Fuzzy Matching) ## Description Searches for approximat...
R_base_tools/strings.html7_74_0.txt
x <- c("apple", "banana", "pear") str_detect(x, "e") #> [1] TRUE FALSE TRUE Remember that when you use a logical vector in a numeric context, ` FALSE ` becomes 0 and ` TRUE ` becomes 1. That makes ` sum() ` and ` mean() ` useful if you want to answer questions about matches across a larger ve...
R_base_tools/R_base_all_32_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) # gc.time: Report Time Spent in Garbage Collection ## Description This function reports the ...
R_base_tools/R_base_all_43_1.txt
variable ` TZ ` set, yet have internal code that expects it (as does POSIX). We have tried to work around this, but if you get unexpected results try setting ` TZ ` . See ` [ Sys.timezone ](/link/Sys.timezone?package=base&version=3.6.2) ` for valid settings. Great care is needed when comparing objects of class ` "POS...
R_base_tools/stringr.html4_48_0.txt
### Anchoring Anchoring simply means that we wish to indicate the start or the end of the string. For example, if instead of finding all instances in which a string contains the letter “a” we want to find those that start with the letter “a”, we can “anchor” our expression with ` "^" ` which indicates the beginni...
R_base_tools/R_base_all_25_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) # hexmode: Display Numbers in Hexadecimal ## Description Convert or print integers in hexade...
R_base_tools/R_base_all_240_2.txt
2) ` signal conditions, and ` [ try ](/link/try?package=base&version=3.6.2) ` is essentially a simplified version of ` tryCatch ` . ` [ assertCondition ](/link/assertCondition?package=base&version=3.6.2) ` in package tools _tests_ that conditions are signalled and works with several of the above handlers. ## Example...
R_base_tools/R_base_all_205_1.txt
R version information.) Function ` .libPaths ` always uses the values of ` .Library ` and ` .Library.site ` in the base namespace. ` .Library.site ` can be set by the site in ` Rprofile.site ` , which should be followed by a call to ` .libPaths(.libPaths()) ` to make use of the updated value. For consistency, the pa...
R_base_tools/strings.html7_130_0.txt
1. Find the stringi functions that: 1. Count the number of words. 2. Find duplicated strings. 3. Generate random text. 2. How do you control the language that ` stri_sort() ` uses for sorting?
R_base_tools/stringr.html3_15_0.txt
x <- c("y", "i", "k") str_order(x) #> [1] 2 3 1 str_sort(x) #> [1] "i" "k" "y" # In Lithuanian, y comes between i and k str_sort(x, locale = "lt") #> [1] "i" "y" "k" The locale always defaults to English to ensure that the default behaviour is identical across systems. Lo...
R_base_tools/R_base_all_393_2.txt
n Goodbye!\n\n") ## Example of Rprofile.site local({ # add MASS to the default packages, set a CRAN mirror old <- getOption("defaultPackages"); r <- getOption("repos") r["CRAN"] <- "http://my.local.cran" options(defaultPackages = c(old, "MASS"), repos = r) ## (for Unix termi...
R_base_tools/stringr.html3_16_0.txt
## Pattern matching The vast majority of stringr functions work with patterns. These are parameterised by the task they perform and the types of patterns they match.
R_base_tools/R_base_all_383_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) # taskCallback: Add or Remove a Top-Level Task Callback ## Description ` addTaskCallback ` r...
R_base_tools/strings.html7_18_0.txt
Like most other functions in R, missing values are contagious. If you want them to print as ` "NA" ` , use ` str_replace_na() ` : x <- c("abc", NA) str_c("|-", x, "-|") #> [1] "|-abc-|" NA str_c("|-", str_replace_na(x), "-|") #> [1] "|-abc-|" "|-NA-|"
R_base_tools/R_base_all_192_1.txt
and ` gsub ` will give a marked UTF-8 result if any of the inputs are UTF-8. ` [ paste ](/link/paste?package=base&version=3.6.2) ` and ` [ sprintf ](/link/sprintf?package=base&version=3.6.2) ` return elements marked as bytes if any of the corresponding inputs is marked as bytes, and otherwise marked as UTF-8 of any of...
R_base_tools/R_base_all_31_1.txt
he string ` "depends.ok" ` then conflicts resulting from attaching declared dependencies will not produce errors, but other conflicts will. This is likely to be the best setting for most users wanting some additional protection against unexpected conflicts. The policy can be tuned further by specifying the ` conflicts...
R_base_tools/R_base_all_367_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) # userhooks: Functions to Get and Set Hooks for Load, Attach, Detach and Unload ## Descriptio...
R_base_tools/R_base_all_338_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) # expression: Unevaluated Expressions ## Description Creates or tests for objects of mode ` ...
R_base_tools/R_base_all_304_1.txt
y [ DataCamp ](https://www.datacamp.com/)
R_base_tools/R_base_all_86_1.txt
un_example_in_workspace) # NOT RUN { .Ob <- 1 ls(pattern = "O") ls(pattern= "O", all.names = TRUE) # also shows ".[foo]" # shows an empty list because inside myfunc no variables are defined myfunc <- function() {ls()} myfunc() # define a local variable inside myfu...
R_base_tools/R_base_all_180_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) # dump: Text Representations of R Objects ## Description This function takes a vector of nam...
R_base_tools/strings.html7_133_0.txt
" R for Data Science " was written by Hadley Wickham and Garrett Grolemund. This book was built by the bookdown R package.
R_base_tools/R_micropan_35_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) # setLeafAttributes: Setting leaf attributes ## Description Function used to set leaf at...
R_base_tools/R_base_all_46_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) # file.choose: Choose a File Interactively ## Description Choose a file interactively. ## ...
R_base_tools/R_base_all_239_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) # assign: Assign a Value to a Name ## Description Assign a value to a name in an environment...
R_base_tools/R_base_all_380_1.txt
be a character string containing just one single-byte character. ( ` NULL ` and a zero-length character vector are also accepted, and taken as the default.) skip the number of lines of the input file to skip before beginning to read data values. nlines if positive, the maximum number of lines of data to be read. n...
R_base_tools/R_base_all_200_1.txt
, …. It is likely that there is a file named something like ` zone.tab ` under that directory listing the locations known as time-zone names (but not for example ` EST5EDT ` ). See also [ https://en.wikipedia.org/wiki/Zone.tab ](https://en.wikipedia.org/wiki/Zone.tab) . Where R was configured with option \--with-in...
R_base_tools/stringr.html4_58_0.txt
### Alternates Sometimes we want to express patterns as a collection of possible matches, alternatives, or even exclude patterns. The most common of these is the square brackets, ` [] ` which indicate that we would like to match any one of the the patterns in brackets.
R_base_tools/R_base_all_409_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) # seek: Functions to Reposition Connections ## Description Functions to re-position connecti...
R_base_tools/R_base_all_101_1.txt
nu <- seq(-10, 9, length.out = 2001) ## --- I() --- --- --- --- matplot(nu, t(outer(xx, nu, besselI)), type = "l", ylim = c(-50, 200), main = expression(paste("Bessel ", I[nu](x), " for fixed ", x, ", as ", f(nu))), xlab = expression(nu)) abline(v...
R_base_tools/R_base_all_200_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) # timezones: Time Zones ## Description Information about time zones in R . ` Sys.timezone ...
R_base_tools/R_base_all_168_2.txt
nge to have warning messages emitted when unsupported options are used. This is done by setting either of the options ` verbose ` or ` warn ` to be non-zero via the ` [ options ](/link/options?package=base&version=3.6.2) ` function. There is a short discussion of these additional arguments with some example code avail...
R_base_tools/R_base_all_402_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) # file.access: Ascertain File Accessibility ## Description Utility function to access inform...
R_base_tools/R_base_all_160_1.txt
^9\\), which is also the limit on each dimension of an array. ## See Also ` [ object.size ](/link/object.size?package=base&version=3.6.2) (a) ` for the (approximate) size of R object ` a ` . Powered by [ DataCamp ](https://www.datacamp.com/)
R_base_tools/strings.html7_81_0.txt
Note that matches never overlap. For example, in ` "abababa" ` , how many times will the pattern ` "aba" ` match? Regular expressions say two, not three: str_count("abababa", "aba") #> [1] 2 str_view_all("abababa", "aba") #> Warning: `str_view()` was deprecated in stringr 1.5.0. #> ℹ Plea...
R_base_tools/R_base_all_139_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) # proc.time: Running Time of R ## Description ` proc.time ` determines how much real and CPU...
R_base_tools/strings.html6_38_0.txt
* ` [:alpha:] ` contains letters, including ` [:upper:] ` and ` [:lower:] ` * ` [:upper:] ` contains uppercase letters and ` [:lower:] ` contains lowercase letters * The regex ` . ` contains all characters in the above classes, except new line.
R_base_tools/stringr.html4_52_0.txt
s <- c("howdy", "otter", "tragedy", "danger", "octopus", "grapes") Not such a silly function now, is it?
R_base_tools/R_base_all_284_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) # sprintf: Use C-style String Formatting Commands ## Description A wrapper for the C functio...
R_base_tools/strings.html7_36_0.txt
But if “ ` . ` ” matches any character, how do you match the character “ ` . ` ”? You need to use an “escape” to tell the regular expression you want to match it exactly, not use its special behaviour. Like strings, regexps use the backslash, ` \ ` , to escape special behaviour. So to match an ` . ` , you need the rege...
R_base_tools/R_base_all_225_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) # Special: Special Functions of Mathematics ## Description Special mathematical functions re...
R_base_tools/R_micropan_24_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) # distManhattan: Computing Manhattan distances between genomes ## Description Computes t...
R_base_tools/R_base_all_156_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) # Syntax: Operator Syntax and Precedence ## Description Outlines R syntax and gives the pr...
R_base_tools/R_base_all_292_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) # Paren: Parentheses and Braces ## Description Open parenthesis, ` ( ` , and open brace, ` {...
R_base_tools/R_base_all_52_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) # trace: Interactive Tracing and Debugging of Calls to a Function or Method ## Description A...
R_base_tools/strings.html7_96_0.txt
` str_extract() ` gives us the complete match; ` str_match() ` gives each individual component. Instead of a character vector, it returns a matrix, with one column for the complete match followed by one column for each group: has_noun %>% str_match(noun) #> [,1] [,2] [,3] ...
R_base_tools/strings.html7_129_0.txt
If you find yourself struggling to do something in stringr, it’s worth taking a look at stringi. The packages work very similarly, so you should be able to translate your stringr knowledge in a natural way. The main difference is the prefix: ` str_ ` vs. ` stri_ ` . ### 14.7.1 Exercises
R_base_tools/R_base_all_354_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) # attr: Object Attributes ## Description Get or set specific attributes of an object. ## U...
R_base_tools/R_base_all_380_3.txt
/link/readChar?package=base&version=3.6.2) ` and ` [ readBin ](/link/readBin?package=base&version=3.6.2) ` to read fixed or variable length character strings or binary representations of numbers a few at a time from a connection. ## Examples [ Run this code ](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdo...
R_base_tools/R_base_all_288_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) # Ops.Date: Operators on the Date Class ## Description Operators for the ` " [ Date ](/link/...
R_base_tools/R_base_all_278_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) # lazyLoad: Lazy Load a Database of R Objects ## Description Internal functions to lazy load...
R_base_tools/R_base_all_389_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) # rowsum: Give Column Sums of a Matrix or Data Frame, Based on a Grouping Variable ## Descrip...
R_base_tools/strings.html6_25_0.txt
* ` str_equal(x, y, locale = "en", ignore_case = FALSE, ...) ` 1 : Determine if two strings are equivalent. str_equal(c("a", "b"), c("a", "c")) * ` str_wrap(string, width = 80, indent = 0, exdent = 0) ` : Wrap strings into nicely formatted paragraphs. str_wrap(sentences, 20)
R_base_tools/stringr.html4_20_0.txt
The first set of functions we will consider will be those that modify strings directly. We already saw above that ` str_sub ` can extract a subset of a string; it can also be used to modify specific portions of a string # position 1 to 3 is "sta" x <- "sta230" str_sub(x, 1, 3) ## [1...
R_base_tools/stringr.html4_17_0.txt
The most common tasks we will have include 1. Mutating strings 2. Joining and splitting strings 3. Subsetting and extracting strings 4. Detecting patterns in strings
R_base_tools/strings.html6_40_0.txt
Alternates regexp | matches | example | example output (highlighted characters are in <>) ---|---|---|--- ` ab|d ` | or | ` alt("ab|d") ` | <ab>c<d>e ` [abe] ` | one of | ` alt("[abe]" ` | <a><b>cd<e> ` [^abe] ` | anything but | ` alt("[^abe]") ` | ...
R_base_tools/strings.html6_17_0.txt
* ` str_dup(string, times) ` : Repeat strings times times. Also ` str_unique() ` to remove duplicates. str_dup(fruit, times = 2) * ` str_split_fixed(string, pattern, n) ` : Split a vector of strings into a matrix of substrings (splitting at occurrences of a pattern match). Also ` str_split() ` to ret...
R_base_tools/R_base_all_255_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) # unlink: Delete Files and Directories ## Description ` unlink ` deletes the file(s) or dire...
R_base_tools/R_base_all_154_1.txt
icular, ` as.numeric ` applied to a factor is meaningless, and may happen by implicit coercion. To transform a factor ` f ` to approximately its original numeric values, ` as.numeric(levels(f))[f] ` is recommended and slightly more efficient than ` as.numeric(as.character(f)) ` . The levels of a factor are by default ...
R_base_tools/R_base_all_76_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.data.frame: Coerce to a Data Frame ## Description Functions to check if an object is a ...
R_base_tools/R_base_all_377_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) # getCallingDLL: Compute DLL for Native Interface Call ## Description This is an internal fu...
R_base_tools/strings.html7_95_0.txt
Earlier in this chapter we talked about the use of parentheses for clarifying precedence and for backreferences when matching. You can also use parentheses to extract parts of a complex match. For example, imagine we want to extract nouns from the sentences. As a heuristic, we’ll look for any word that comes after “a” ...
R_base_tools/R_base_all_158_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) # source: Read R Code from a File, a Connection or Expressions ## Description ` source ` cau...
R_base_tools/R_base_all_313_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) # kappa: Compute or Estimate the Condition Number of a Matrix ## Description The condition n...
R_base_tools/R_base_all_299_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) # grouping: Grouping Permutation ## Description ` grouping ` returns a permutation which rea...
R_base_tools/R_base_all_306_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) # bitwise: Bitwise Logical Operations ## Description Logical operations on integer vectors w...
R_base_tools/strings.html7_33_0.txt
To learn regular expressions, we’ll use ` str_view() ` and ` str_view_all() ` . These functions take a character vector and a regular expression, and show you how they match. We’ll start with very simple regular expressions and then gradually get more and more complicated. Once you’ve mastered pattern matching, you’ll...
R_base_tools/strings.html7_21_0.txt
To collapse a vector of strings into a single string, use ` collapse ` : str_c(c("x", "y", "z"), collapse = ", ") #> [1] "x, y, z"
R_base_tools/strings.html7_117_0.txt
* ` multiline = TRUE ` allows ` ^ ` and ` $ ` to match the start and end of each line rather than the start and end of the complete string. x <- "Line 1\nLine 2\nLine 3" str_extract_all(x, "^Line")[[1]] #> [1] "Line" str_extract_all(x, regex("^Line", multiline = TRUE))[[1]] #> [1] "Line"...
R_base_tools/R_base_all_144_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) # zpackages: Listing of Packages ## Description ` .packages ` returns information about pack...
R_base_tools/R_base_all_374_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) # raw: Raw Vectors ## Description Creates or tests for objects of type ` "raw" ` . ## Usag...
R_base_tools/R_base_all_404_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) # tapply: Apply a Function Over a Ragged Array ## Description Apply a function to each cell ...
R_base_tools/R_base_all_319_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) # pcre_config: Report Configuration Options for PCRE ## Description Report some of the confi...
R_base_tools/R_base_all_94_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) # numeric: Numeric Vectors ## Description Creates or coerces objects of type ` "numeric" ` ....
R_base_tools/strings.html7_37_0.txt
If ` \ ` is used as an escape character in regular expressions, how do you match a literal ` \ ` ? Well you need to escape it, creating the regular expression ` \\ ` . To create that regular expression, you need to use a string, which also needs to escape ` \ ` . That means to match a literal ` \ ` you need to write ` ...
R_base_tools/R_base_all_358_1.txt
"variable %s contains missing values\n", "variables %s contain missing values\n"), paste(sQuote(miss), collapse = ", "))) # } 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_6_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) # logical: Logical Vectors ## Description Create or test for objects of type ` "logical" ` ,...
R_base_tools/R_base_all_82_1.txt
rse data can be retrieved using ` [ getParseData ](/link/getParseData?package=base&version=3.6.2) ` applied to the ` srcfile ` object. Because parsing was incomplete, it will typically include references to ` "parent" ` entries that are not present. ## Details ` parse(....) ` : If ` text ` has length greater ...
R_base_tools/R_base_all_199_1.txt
ines ` : controls the number of lines used when deparsing in ` [ traceback ](/link/traceback?package=base&version=3.6.2) ` , ` [ browser ](/link/browser?package=base&version=3.6.2) ` , and upon entry to a function whose debugging flag is set. Initially unset, and only used if set to a positive integer. ` digits...
R_base_tools/R_base_all_41_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) # nargs: The Number of Arguments to a Function ## Description When used inside a function bo...
R_base_tools/R_base_all_220_1.txt
"s A <- 10.5 call("round", A) # round(10.5) call("round", quote(A)) # round(A) f <- "round" call(f, quote(A)) # round(A) ## if we want to supply a function we need to use as.call or similar f <- round # } # NOT RUN { call(f, quote(A)) # error: first arg must be...
R_base_tools/strings.html6_31_0.txt
and ` writeLines("\\ is a backslash") ` will be parsed as ` \ is a backslash ` . ### Interpretation
R_base_tools/R_base_all_198_2.txt
ssible in only one of the modes: for example ` [ pushBack ](/link/pushBack?package=base&version=3.6.2) ` is text- oriented and is only allowed on connections open for reading in text mode, and binary operations such as ` [ readBin ](/link/readBin?package=base&version=3.6.2) ` , ` [ load ](/link/load?package=base&versio...
R_base_tools/R_base_all_169_1.txt
h = 2) # not the same. rep(1:4, c(2,2,2,2)) # same as second. rep(1:4, c(2,1,2,1)) rep(1:4, each = 2, len = 4) # first 4 only. rep(1:4, each = 2, len = 10) # 8 integers plus two recycled 1's. rep(1:4, each = 2, times = 3) # length 24, 3 complete replications rep(1, 40*(1-.8)...
R_base_tools/R_base_all_198_1.txt
ger status, invisibly. The status is from when the connection was last closed and is available only for some types of connections (e.g., pipes, files and fifos): typically zero values indicate success. Negative values will result in a warning; if writing, these may indicate write failures and should not be ignored. ` ...
R_base_tools/R_base_all_113_1.txt
ons(op) # } 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%2FTrig&utm_source=r-docs&utm_medium=docs&utm_term=Trig&utm_content=run_example_in_workspace) Powered by [ DataCamp ](https:...
R_base_tools/R_base_all_237_1.txt
` and ` [ readRDS ](/link/readRDS?package=base&version=3.6.2) ` . ## Examples [ Run this code ](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fload&utm_source=r-docs&utm_medium=docs&utm_term=load&utm_content=run_example_in_workspace) # NOT...
R_base_tools/stringr.html4_24_0.txt
We can specify that we want this to apply to all instances of the pattern with ` str_replace_all ` str_replace_all(dog, "dog", "GOD") ## [1] "GOD_GOD_GOD_GOD_GOD"