id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
String_prototype/String_prototype_30_4.txt |
a-string/34717402#34717402) .
If ` separator ` is a regexp that matches empty strings, whether the match is
split by UTF-16 code units or Unicode code points depends on if the regex is [
Unicode-aware ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode#unicode-
aware_mode) .
js
"ð... | |
String_prototype/String_prototype_30_3.txt | )
7. [ ` Object.prototype.propertyIsEnumerable() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable)
8. [ ` Object.prototype.toLocaleString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString)
9. [ ` Object.prototype.toString() ` ](/en-US/docs/Web... | |
stackoverflow-94/extraction_1.txt | With discord v14, I was trying to use the `messageCreate` event, however, after a user types a message in discord, `message.content` doesn't have any data as shown below: ```hljs javascript Message { channelId: '998889338475655188', guildId: '948995127148425246', id: '998925735668498433', createdTimestamp: 165823285452... | |
stackoverflow-94/extraction_2.txt | ``` ## Methods ### avatarURL( options?: ImageURLOptions = {} ) : string \| null Open source file in new tab A link to the member's guild avatar. ### ban( options?: BanOptions ) : Promise<GuildMember> Open source file in new tab Bans this guild member. Examples: ``` // Ban a guild member, deleting a week's worth of mess... | |
stackoverflow-94/extraction_3.txt | # Role Hierarchy System The role hierarchy is crucial for server management and security. It offers a structured way to delegate permissions to users and establish anything from a multi-tiered public server admin system to a trusted buddy in your private server helping out here and there. Here's how the hierarchy works... | |
stackoverflow-95/extraction_2.txt | # Go Client for Apache Kafka ¶ Confluent develops and maintains a Go client for Apache Kafka® that offers a producer and a consumer. This library provides capabilities to produce to and consume from Kafka topics using Go. For a step-by-step guide on building a Go client application for Kafka, see Getting Started with A... | |
stackoverflow-95/extraction_3.txt | ``` [](https://forum.golangbridge.org/u/georgelza) georgelzaGeorge Leonard Jul 2023 Hi all. when I do a `go run main.go` it runs - on my MBP -M1 when I do a go build . it builds, when I run try and build it with the below exports or execute the Makefile it fails - error below <ps I’ve tried this same command/steps on a... | |
stackoverflow-95/extraction_4.txt | I was trying to install one of my go files. But I bumped into this error ```hljs go C:\mygoproject>go install kafkapublisher.go \#command-line-arguments .\kafkapublisher.go:8:65: undefined: kafka.Message .\kafkapublisher.go:10:19: undefined: kafka.NewProducer .\kafkapublisher.go:10:38: undefined: kafka.ConfigMap .\kafk... | |
stackoverflow-96/extraction_0.txt | # requests.Response.iter\_content ¶ `Response.` `iter_content`( _chunk\_size=1_, _decode\_unicode=False_) [\[source\]](https://tedboy.github.io/requests/_modules/requests/models.html#Response.iter_content) ¶ Iterates over the response data. When stream=True is set on the request, this avoids reading the content at once... | |
stackoverflow-96/extraction_1.txt | ## Description !@slingamn slingamn opened on Sep 6, 2012 Contributor Issue body actions This ticket is intended to aggregate previous discussion from #539, #589, and #597 about the default value of `chunk_size` used by `iter_content` and `iter_lines`. cc @mponton @gwrtheyrn @shazow Issues: 1. The default read size of `... | |
stackoverflow-96/extraction_2.txt | ## Body Content Workflow ¶ By default, when you make a request, the body of the response is downloaded immediately. You can override this behaviour and defer downloading the response body until you access the `Response.content` attribute with the `stream` parameter: ``` tarball_url = 'https://github.com/psf/requests/ta... | |
stackoverflow-96/extraction_3.txt | ``` # Ideal Chunk Size for python requests Ask Question Asked11 years, 4 months ago Modified 5 years ago Viewed 58k times This question shows research effort; it is useful and clear 41 Save this question. Timeline Show activity on this post. Is there any guideline on selecting chunk size? I tried different chunk size b... | |
stackoverflow-96/extraction_4.txt | ``` ## Tuning a UDP connection iPerf creates a constant bit rate UDP stream. This is a very artificial stream, similar to voice communication but not much else. You will want to adjust the datagram size (-l) to the size your application uses. The server detects UDP datagram loss by ID numbers in the datagrams. Usually ... | |
stackoverflow-96/extraction_5.txt | ### iPerf3 This is a complete rewrite of the original iPerf tool. It has many of the same features, although it does not yet do multicast. Below are some basic commands to get started, which are the same options available in version 2. For bandwidth testing, iPerf3 is preferable over iPerf1 or 2. NVIDIA tested iPerf3 a... | |
stackoverflow-96/extraction_6.txt | iperf3 is a commonly used tool to test network throughput on servers, and is regarded as a more reliable test method compared to other tools like speedtest-cli due to the different testing methodology and the fact that iperf3 is has many features to customize usage. The following command will test with the client (the ... | |
stackoverflow-96/extraction_7.txt | # PycURL – A Python Interface To The cURL library ¶ PycURL is a Python interface to libcurl, the multiprotocol file transfer library. Similarly to the urllib Python module, PycURL can be used to fetch objects identified by a URL from a Python program. Beyond simple fetches however PycURL exposes most of the functionali... | |
stackoverflow-96/extraction_8.txt | # Short Summary of Results PyCurl is much faster than Requests (or other HTTP client libraries), generally completing smaller requests 2-3x as fast, and requires 3-10x less CPU time. This is most visible with connection creation for small requests; given large enough requests (above 100 kB/s), Requests can still satura... | |
stackoverflow-96/extraction_9.txt | # Comparison over real-world example When comparing AIOHTTP and Requests, it’s essential to consider several key aspects: ease of use, scalability and concurrency, and suitability for large-scale applications. Let’s examine these factors using the context of using the NSFW Image Classification API developed by API4AI a... | |
stackoverflow-96/extraction_10.txt | ### 33.5.2. The system-wide TCP socket buffer settings Copy link Socket buffers temporarily store data that the kernel has received or should send: - The read socket buffer holds packets that the kernel has received but which the application has not read yet. - The write socket buffer holds packets that an application ... | |
stackoverflow-96/extraction_11.txt | # TCP Tuning Adjust the network congestion avoidance parameters for TCP Typically used over high-bandwidth, high-latency networks Long-haul links (Long Fat Networks) Intercontinental circuits Well-tuned networks can perform up to many times faster # Tuning buffers. Most operating systems limit the amount of system memo... | |
stackoverflow-98/extraction_0.txt | I'm trying to make a subclass of timedelta that expects to receive milliseconds instead of seconds, but it's not currently working. Am I going against the grain? Is there a "right" way to achieve this with Pydantic? Or do I somehow need to tell Pydantic that `MillisecondTimedelta` is just a `timedelta`.. ```hljs python... | |
stackoverflow-98/extraction_1.txt | | msg397387 \- (view) | Author: Mauricio Villegas (mauvilsa) | Date: 2021-07-13 07:41 | | ```<br>Classes in the datetime module are implemented using __new__ with some named parameters. I want to be able to inspect their signature to know which are the names of the parameters it accepts like it works for most classes. ... | |
stackoverflow-98/extraction_2.txt | ### Classes with `__get_validators__` ¶ You use a custom class with a classmethod `__get_validators__`. It will be called to get validators to parse and validate the input data. Tip These validators have the same semantics as in Validators, you can declare a parameter `config`, `field`, etc. Python 3.7 and above ``` im... | |
stackoverflow-98/extraction_3.txt | I'm trying to make a subclass of timedelta that expects to receive milliseconds instead of seconds, but it's not currently working. Am I going against the grain? Is there a "right" way to achieve this with Pydantic? Or do I somehow need to tell Pydantic that `MillisecondTimedelta` is just a `timedelta`.. ```hljs python... | |
stackoverflow-98/extraction_5.txt | ``` ## Field validators ¶ API Documentation `pydantic.functional_validators.WrapValidator` `pydantic.functional_validators.PlainValidator` `pydantic.functional_validators.BeforeValidator` `pydantic.functional_validators.AfterValidator` `pydantic.functional_validators.field_validator` In its simplest form, a field valid... | |
stackoverflow-99/extraction_0.txt | ## Adding Assets Outside of the Module System You can also add other assets to the `public` folder. Note that we normally encourage you to `import` assets in JavaScript files instead. For example, see the sections on adding a stylesheet and adding images and fonts. This mechanism provides a number of benefits: - Scri... | |
stackoverflow-99/extraction_1.txt | ## Importing Asset as URL Importing a static asset will return the resolved public URL when it is served: js ``` import imgUrl from './img.png' document. getElementById('hero-img').src = imgUrl ``` For example, `imgUrl` will be `/src/img.png` during development, and become `/assets/img.2d8efhg.png` in the production ... | |
stackoverflow-99/extraction_2.txt | ## Adding Assets Outside of the Module System You can also add other assets to the `public` folder. Note that we normally encourage you to `import` assets in JavaScript files instead. For example, see the sections on adding a stylesheet and adding images and fonts. This mechanism provides a number of benefits: - Scri... | |
stackoverflow-9/extraction_0.txt | # polars.concat\_list \# polars.concat\_list( _exprs:IntoExpr\|Iterable\[IntoExpr\]_, _\*more\_exprs:IntoExpr_)→Expr [\[source\]](https://github.com/pola-rs/polars/blob/py-1.32.3/py-polars/polars/functions/as_datatype.py#L431-L500) # Horizontally concatenate columns into a single list column. Operates in linear time. P... | |
R_base_tools/R_base_all_234_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)
# transform: Transform an Object, for Example a Data Frame
## Description
` transform ` is a... | |
R_base_tools/R_base_all_399_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)
# NotYet: Not Yet Implemented Functions and Unused Arguments
## Description
In order to pinp... | |
R_base_tools/R_base_all_60_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)
# search: Give Search Path for R Objects
## Description
Gives a list of ` [ attach ](/link/a... | |
R_base_tools/R_base_all_210_1.txt | n ` ), but
portable code should not use Fortran names containing underscores.
Use ` .Fortran ` with care for compiled Fortran 9x code: it may not work if
the Fortran 9x compiler used differs from the Fortran 77 compiler used when
configuring R , especially if the subroutine name is not lower-case or
includes an unde... | |
R_base_tools/R_micropan_40_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)
# hmmerCleanOverlap and nonoverlap: Removing overlapping hits from HMMER3
scans
## Descri... | |
R_base_tools/strings.html7_60_0.txt | By default these matches are “greedy”: they will match the longest string
possible. You can make them “lazy”, matching the shortest string possible by
putting a ` ? ` after them. This is an advanced feature of regular
expressions, but it’s useful to know that it exists:
str_view(x, 'C{2,3}?')
#> [1] ... | |
R_base_tools/R_base_all_182_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-internals: Namespace Internals
## Description
Internal namespace support functions. Not... | |
R_base_tools/R_base_all_125_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)
# LongVectors: Long Vectors
## Description
Vectors of \\(2^{31}\\) or more elements were add... | |
R_base_tools/stringr.html4_8_0.txt | ` str_sub ` also (conveniently) works with negative numbers. In this case,
they work backwards from the end of a string
str_sub(y, start = -7, end = -3)
## [1] "fight" | |
R_base_tools/R_base_all_188_1.txt | ction.
Because of the way it is implemented, on a Unix-alike ` stderr = TRUE `
implies ` stdout = TRUE ` : a warning is given if this is not what was
specified.
When ` timeout ` is non-zero, the command is terminated after the given number
of seconds. The termination works for typical commands, but is not guaranteed:... | |
R_base_tools/R_base_all_246_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)
# match: Value Matching
## Description
` match ` returns a vector of the positions of (first... | |
R_base_tools/strings.html7_106_0.txt | ### 14.4.5 Splitting
Use ` str_split() ` to split a string up into pieces. For example, we could
split sentences into words: | |
R_base_tools/strings.html7_66_0.txt | 1. Describe, in words, what these expressions will match:
1. ` (.)\1\1 `
2. ` "(.)(.)\\2\\1" `
3. ` (..)\1 `
4. ` "(.).\\1.\\1" `
5. ` "(.)(.)(.).*\\3\\2\\1" `
2. Construct regular expressions to match words that: | |
R_base_tools/strings.html7_115_0.txt | When you use a pattern that’s a string, it’s automatically wrapped into a call
to ` regex() ` :
# The regular call:
str_view(fruit, "nana")
# Is shorthand for
str_view(fruit, regex("nana")) | |
R_base_tools/R_base_all_191_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)
# chartr: Character Translation and Casefolding
## Description
Translate characters in chara... | |
R_base_tools/strings.html7_77_0.txt | A common use of ` str_detect() ` is to select the elements that match a
pattern. You can do this with logical subsetting, or the convenient `
str_subset() ` wrapper:
words[str_detect(words, "x$")]
#> [1] "box" "sex" "six" "tax"
str_subset(words, "x$")
#> [1] "box" "sex" "six" "tax" | |
R_base_tools/R_base_all_77_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)
# weekdays: Extract Parts of a POSIXt or Date Object
## Description
Extract the weekday, mon... | |
R_base_tools/R_base_all_153_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)
# outer: Outer Product of Arrays
## Description
The outer product of the arrays ` X ` and ` ... | |
R_base_tools/stringr.html4_30_0.txt | ### Joining and splitting
Next we have joining and splitting which, as the heading suggests, involves
joining or splitting strings together. Joining strings is especially useful
when we want to present summary information based on statistics that have yet
to be computed. ` str_c ` takes a comma separated collection o... | |
R_base_tools/stringr.html4_50_0.txt |
s <- c("apple", "pineapple", "banana")
str_subset(s, "a")
## [1] "apple" "pineapple" "banana"
str_subset(s, "a$")
## [1] "banana"
Of course, if we actually wanted to find “^” or “$”, we would need to escape
them | |
R_base_tools/R_base_all_260_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)
# levels: Levels Attributes
## Description
` levels ` provides access to the levels attribut... | |
R_base_tools/R_base_all_337_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)
# unlist: Flatten Lists
## Description
Given a list structure ` x ` , ` unlist ` simplifies ... | |
R_base_tools/R_base_all_104_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)
# quit: Terminate an R Session
## Description
The function ` quit ` or its alias ` q ` termi... | |
R_base_tools/strings.html7_131_0.txt | 13 Relational data
15 Factors | |
R_base_tools/R_base_all_56_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.object: Is an Object ‘internally classed’?
## Description
A function rather for interna... | |
R_base_tools/stringr.html4_40_0.txt |
s <- c("dog", "cat", "parrot", "hamster")
idx <- str_detect(s, pattern = "o")
s[idx] # true and false values
## [1] "dog" "parrot"
str_subset(s, "o")
## [1] "dog" "parrot"
Also useful is ` str_count ` which counts the number of times a pattern
appea... | |
R_base_tools/R_base_all_130_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)
# nrow: The Number of Rows/Columns of an Array
## Description
` nrow ` and ` ncol ` return t... | |
R_base_tools/R_base_all_197_1.txt | /dev2bitmap?package=base&version=3.6.2) ` , ` [ bitmap
](/link/bitmap?package=base&version=3.6.2) ` and ` [ embedFonts
](/link/embedFonts?package=base&version=3.6.2) ` . Consulted when those
functions are invoked. Since it will be treated as if passed to ` [ system
](/link/system?package=base&version=3.6.2) ` , spaces ... | |
R_base_tools/R_base_all_161_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)
# dcf: Read and Write Data in DCF Format
## Description
Reads or writes an R object from/t... | |
R_base_tools/R_base_all_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
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# do.call: Execute a Function Call
## Description
` do.call ` constructs and executes a func... | |
R_base_tools/stringr.html4_64_0.txt |
s <- c("Apple", "Pineapple", "Pear", "Orange", "Peach", "Banana")
str_subset(s, "ap*")
## [1] "Pineapple" "Pear" "Orange" "Peach" "Banana"
This seems a little silly, but its utility becomes more apparent in the
following example | |
R_base_tools/R_base_all_351_2.txt | apply(v, f2, outer(1:3, 1:5), y = 2*(1:5))
stopifnot(dim(a2) == c(3,5,4), all.equal(a2, a.2),
identical(dimnames(a2), list(NULL,NULL,LETTERS[1:4])))
hist(replicate(100, mean(rexp(10))))
## use of replicate() with parameters:
foo <- function(x = 1, y = 2) c(x, y)
# does not wo... | |
R_base_tools/strings.html7_123_0.txt | The downside of ` coll() ` is speed; because the rules for recognising which
characters are the same are complicated, ` coll() ` is relatively slow
compared to ` regex() ` and ` fixed() ` .
* As you saw with ` str_split() ` you can use ` boundary() ` to match boundaries. You can also use it with the other func... | |
R_base_tools/R_base_all_317_1.txt | this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fprint&utm_source=r-docs&utm_medium=docs&utm_term=print&utm_content=run_example_in_workspace)
# NOT RUN {
require(stats)
ts(1:20) #-- print is the "Default function" --> ... | |
R_base_tools/R_base_all_390_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)
# qr: The QR Decomposition of a Matrix
## Description
` qr ` computes the QR decomposition o... | |
R_base_tools/R_base_all_90_1.txt | ` stderr ` will be sent to
the terminal unless ` ignore.stderr = TRUE ` . They can be captured (in the
most likely shells) by
system("some command 2>&1", intern = TRUE)
For GUIs, what happens to output sent to ` stdout ` or ` stderr ` if ` intern
= FALSE ` is interface-specific, and it is unsaf... | |
R_base_tools/R_base_all_264_3.txt | ## all with same width (one more than the specified minimum)
## individual formatting to common width:
fc <- formatC(1.234 + 10^(0:8), format = "fg", width = 11, big.mark = "'")
cbind(fc)
## Powers of two, stored exactly, formatted individually:
pow.2 <- formatC(2^-(1:32), digits = 24, width ... | |
R_base_tools/R_base_all_196_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)
# dontCheck: Identity Function to Suppress Checking
## Description
The ` dontCheck ` functio... | |
R_base_tools/R_base_all_344_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)
# crossprod: Matrix Crossproduct
## Description
Given matrices ` x ` and ` y ` as arguments,... | |
R_base_tools/R_base_all_364_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)
# sequence: Create A Vector of Sequences
## Description
For each element of ` nvec ` the seq... | |
R_base_tools/R_base_all_38_1.txt | ng ` NULL ` removes the class attribute.
` unclass ` returns (a copy of) its argument with its class attribute removed.
(It is not allowed for objects which cannot be copied, namely environments and
external pointers.)
` inherits ` indicates whether its first argument inherits from any of the
classes specified in the... | |
R_base_tools/R_base_all_375_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)
# nchar: Count the Number of Characters (or Bytes or Width)
## Description
` nchar ` takes a... | |
R_base_tools/R_base_all_126_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)
# octmode: Display Numbers in Octal
## Description
Convert or print integers in octal format... | |
R_base_tools/stringr.html3_6_0.txt | You can also use ` str_sub() ` to modify strings:
str_sub(x, 3, 3) <- "X"
x
#> [1] "abXdef" "ghXfjk" | |
R_base_tools/R_base_all_257_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.info: Extract File Information
## Description
Utility function to extract information... | |
R_base_tools/R_base_all_3_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)
# chol: The Choleski Decomposition
## Description
Compute the Choleski factorization of a re... | |
R_base_tools/strings.html6_19_0.txt | ## Manage Lengths
* ` str_length(string) ` : The width of strings (i.e. number of code points, which generally equals the number of characters).
str_length(fruit) | |
R_base_tools/R_base_all_179_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)
# complex: Complex Numbers and Basic Functionality
## Description
Basic functions which supp... | |
R_base_tools/R_tools_2_0.txt | [ RDocumentation ](/)
Moon [ ](https://github.com/datacamp/rdocumentation-2.0) [ Learn R
](https://www.datacamp.com/learn/r)
Search all packages and functions
[ tools (version 3.6.2 ) ](/packages/tools/versions/3.6.2)
# parseLatex: Experimental Functions to Work with LaTeX Code
## Description
The ` parseLat... | |
R_base_tools/strings.html6_35_0.txt |
see <- function(rx) str_view("abc ABC 123\t.!?\\(){}\n", rx)
1Many base R functions require classes to be wrapped in a second set of [ ],
e.g. [[:digit:]] string
(type this) | regex
(to mean this) | matches
(which matches this) | example | example output (highlighted characters are in <... | |
R_base_tools/R_base_all_140_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)
# mode: The (Storage) Mode of an Object
## Description
Get or set the type or storage mode o... | |
R_base_tools/strings.html7_46_0.txt | 1. Start with “y”.
2. End with “x”
3. Are exactly three letters long. (Don’t cheat by using ` str_length() ` !)
4. Have seven letters or more.
Since this list is long, you might want to use the ` match ` argument to `
str_view() ` to show only the matching or non-matching words. | |
R_base_tools/R_base_all_197_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)
# EnvVar: Environment Variables
## Description
Details of some of the environment variables ... | |
R_base_tools/strings.html6_44_0.txt | Use parentheses to set precedent (order of evaluation) and create groups
Groups regexp | matches | example | example output
(highlighted characters are in <>)
---|---|---|---
` (ab|d)e ` | sets precedence | ` alt("(ab|d)e") ` |
abc<de>
Use an escaped number to refer to and duplicat... | |
R_base_tools/R_base_all_92_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)
# sort: Sorting or Ordering Vectors
## Description
Sort (or _order_ ) a vector or factor (pa... | |
R_base_tools/strings.html7_76_0.txt |
# Find all words containing at least one vowel, and negate
no_vowels_1 <- !str_detect(words, "[aeiou]")
# Find all words consisting only of consonants (non-vowels)
no_vowels_2 <- str_detect(words, "^[^aeiou]+$")
identical(no_vowels_1, no_vowels_2)
#> [1] TRUE
The results are identical... | |
R_base_tools/R_base_all_295_1.txt | _medium=docs&utm_term=strsplit&utm_content=run_example_in_workspace)
# NOT RUN {
noquote(strsplit("A text I want to display with spaces", NULL)[[1]])
x <- c(as = "asfef", qu = "qwerty", "yuiop[", "b", "stuff.blah.yech")
# split x on the letter e
strsplit(x, "e")
unlist(strsp... | |
R_base_tools/stringr.html4_25_0.txt | Personally, I really like using this function to remove characters I don’t
want by replacing a pattern with ` "" ` or ` "_" `
x <- "123-456-789"
str_replace_all(x, "-", "")
## [1] "123456789" | |
R_base_tools/R_base_all_283_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)
# make.unique: Make Character Strings Unique
## Description
Makes the elements of a characte... | |
R_base_tools/R_base_all_330_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)
# base-internal: Internal Objects in Package base
## Description
Internal objects in the ba... | |
R_base_tools/strings.html7_48_0.txt | * ` \d ` : matches any digit.
* ` \s ` : matches any whitespace (e.g. space, tab, newline).
* ` [abc] ` : matches a, b, or c.
* ` [^abc] ` : matches anything except a, b, or c.
Remember, to create a regular expression containing ` \d ` or ` \s ` , you’ll
need to escape the ` \ ` for the string, so you’ll t... | |
R_base_tools/R_base_all_16_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.which: Find Full Paths to Executables
## Description
This is an interface to the syste... | |
R_base_tools/R_micropan_4_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)
# reverseComplement: Reverse-complement of a DNA or RNA sequence
## Description
Translat... | |
R_base_tools/stringr.html3_14_0.txt |
x <- "I like horses."
str_to_upper(x)
#> [1] "I LIKE HORSES."
str_to_title(x)
#> [1] "I Like Horses."
str_to_lower(x)
#> [1] "i like horses."
# Turkish has two sorts of i: with and without the dot
str_to_lower(x, "tr")
#> [1] "ı like horses."
String ordering and ... | |
R_base_tools/R_base_all_117_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)
# autoload: On-demand Loading of Packages
## Description
` autoload ` creates a promise-to-e... | |
R_base_tools/R_micropan_18_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.Fasta: Plotting and printing ` Fasta ` objects
## Description
Generic functions f... | |
R_base_tools/R_base_all_427_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)
# mat.or.vec: Create a Matrix or a Vector
## Description
` mat.or.vec ` creates an ` nr ` by... | |
R_base_tools/R_base_all_175_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)
# CallExternal: Modern Interfaces to C/C++ code
## Description
Functions to pass R objects... | |
R_base_tools/R_base_all_203_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_library: LAPACK Library
## Description
Report the name of the shared object file with `... | |
R_base_tools/R_base_all_252_1.txt | shQuote ](/link/shQuote?package=base&version=3.6.2) ` for quoting OS
commands.
## Examples
[ Run this code
](https://app.datacamp.com/workspace/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2FsQuote&utm_source=r-docs&utm_medium=docs&utm_term=sQuote&utm_content=run_example_in_workspace)
... | |
R_base_tools/R_base_all_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
[ base (version 3.6.2 ) ](/packages/base/versions/3.6.2)
# vector: Vectors
## Description
` vector ` produces a vector of the given length and mode.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.