id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
R_base_all/R_base_all_387_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) # rawConnection: Raw Connections ## Description Input and output raw connections. ## Usage...
R_base_all/80542_0_0.txt
Posit Community # Split a string in a dataframe column
R_base_all/split-data-frame-string-column-into-multiple-columns0_35_0.txt
hadley hadley 103k 34 34 gold badges 184 184 silver badges 245 245 bronze badges
R_base_all/simulation.html8_27_0.txt
The ` sample() ` function draws randomly from a specified set of (scalar) objects allowing you to sample from arbitrary distributions of numbers. > set.seed(1) > sample(1:10, 4) [1] 9 4 7 1 > sample(1:10, 4) [1] 2 7 3 6 > > ## Doesn't have to be numbers > sample(letters, 5) ...
R_base_all/R_base_all_241_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) # diag: Matrix Diagonals ## Description Extract or replace the diagonal of a matrix, or cons...
R_base_all/split-data-frame-string-column-into-multiple-columns0_113_0.txt
Share Follow
R_base_all/R_base_all_70_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) # Constants: Built-in Constants ## Description Constants built into R . ## Usage ...
R_base_all/R_base_all_281_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) # slice.index: Slice Indexes in an Array ## Description Returns a matrix of integers indicat...
R_base_all/weighted-average-excel4_170_0.txt
April 30, 2012 at 1:45 pm let me try this formula
R_base_all/weighted-average-excel4_125_0.txt
Help! Reply
R_base_all/R_base_all_43_3.txt
# an hour ago as.POSIXlt(Sys.time(), "GMT") # the current time in GMT format(.leap.seconds) # the leap seconds in your time zone print(.leap.seconds, tz = "PST8PDT") # and in Seattle's # } # NOT RUN { <!-- % ..test should be diffable from here on: --> # } # NOT RUN...
R_base_all/getting-started-simulating-data8_97_0.txt
This is a hard mistake to catch. If you look carefully through the output below you can see that the continuous variables start to repeat on line 10 because I used ` n = 10 ` instead of ` n = 20 ` . data.frame(group = rep(LETTERS[3:4], each = 10), x = runif(n = 10, min = 10, max = 15), ...
R_base_all/R_base_all_289_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) # memlimits: Query and Set Heap Size Limits ## Description Query and set the maximal size of...
R_base_all/R_base_all_13_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) # startsWith: Does String Start or End With Another String? ## Description Determines if ent...
R_base_all/split-data-frame-string-column-into-multiple-columns0_206_0.txt
R, dplyr split dataframe by string in columns #### Hot Network Questions
R_base_all/weighted-average-excel4_353_0.txt
### Leave a Reply Click here to cancel reply.
R_base_all/1370168_10_0.txt
FJCC once again you have come to my rescue I can't thank you enough. Yes the weights add up to one for a date, an error I made. But from the code you provided I can easily adjust it to fix the problem. Thank you, Thank you, thank you!!! system Closed May 19, 2022, 9:21pm 4
R_base_all/split-data-frame-string-column-into-multiple-columns0_124_0.txt
> after attr type_1 type_2 1 1 foo bar 2 30 foo bar_2 3 4 foo bar 4 6 foo bar_2 Share
R_base_all/split-data-frame-string-column-into-multiple-columns0_211_0.txt
* Questions * Help ##### Products
R_base_all/R_base_all_99_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) # sign: Sign Function ## Description ` sign ` returns a vector with the signs of the corresp...
R_base_all/pandas.Series.str.split.html8_32_0.txt
Notes The handling of the n keyword depends on the number of found splits:
R_base_all/split-data-frame-string-column-into-multiple-columns0_59_0.txt
94 5 years later adding the obligatory ` data.table ` solution
R_base_all/split-data-frame-string-column-into-multiple-columns0_57_0.txt
` tidyr::separate ` has been superseded by ` tidyr::separate_wider_delim ` . – robertspierre
R_base_all/weighted-average-excel4_39_0.txt
100 Excel Formulas List From simple to complex, there is a formula for every occasion. Check out the list now.
R_base_all/weighted-average-excel4_301_0.txt
September 9, 2014 at 8:55 am @Hui
R_base_all/1358206-date-manipulation-volume-weighted-average1_23_0.txt
Post Cancel * Robert Picard
R_base_all/R_base_all_339_1.txt
eview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2F.Platform&utm_source=r-docs&utm_medium=docs&utm_term=.Platform&utm_content=run_example_in_workspace) # NOT RUN { ## Note: this can be done in a system-independent way by dir.exists() if(.Platform$OS.type == "unix") { ...
R_base_all/R_base_all_265_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.sleep: Suspend Execution for a Time Interval ## Description Suspend execution of R e...
R_base_all/weighted-average-excel4_334_0.txt
@Malyne When you talk Percentage are you refering to percentage of the start weight, target weight or Percentage of the weight to be lost?
R_base_all/weighted-average-excel4_354_0.txt
Name (required) Mail (will not be published) (required)
R_base_all/getting-started-simulating-data8_13_0.txt
There are three arguments to ` rnorm() ` . From the ` Usage ` section of the documentation: > rnorm(n, mean = 0, sd = 1)
R_base_all/R_base_all_264_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) # formatC: Formatting Using C-style Formats ## Description ` formatC() ` formats numbers ind...
R_base_all/weighted-average-excel4_238_0.txt
1 Item # Omelettes Level Code Category Mix Avg Price 2 256 Colorado Omelette 1 25.0% $6.80
R_base_all/weighted-average-excel4_356_0.txt
Δ ### Get FREE Excel & Power-BI Newsletter
R_base_all/split-data-frame-string-column-into-multiple-columns0_56_0.txt
Nov 8, 2021 at 13:07 * 2
R_base_all/R_base_all_63_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) # print.data.frame: Printing Data Frames ## Description Print a data frame. ## Usage ...
R_base_all/R_base_all_285_1.txt
)) close(con) unique(Encoding(A)) # will most likely be UTF-8 # } 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%2FreadLines&utm_source=r-docs&utm_medium=docs&utm_term=readLine...
R_base_all/R_base_all_64_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) # getwd: Get or Set Working Directory ## Description ` getwd ` returns an absolute filepath ...
R_base_all/weighted-average-excel4_232_0.txt
49. Frustrated Analyst!! says: March 9, 2013 at 5:01 pm
R_base_all/1188876_12_0.txt
` "[0-9]*," ` : this means "any digits any number of times, followed by a comma". ` [0-9] ` looks for any digit; ` * ` means "any number of times ` , and ` ,` is a literal comma. Note : if your real data has a different format than the toy example (i.e. if the thing you're trying to remove isn't always digits followe...
R_base_all/pandas.Series.str.split.html8_43_0.txt
>>> s = pd.Series(["foo and bar plus baz"]) >>> s.str.split(r"and|plus", expand=True) 0 1 2 0 foo bar baz Regular expressions can be used to handle urls or file names. When pat is a string and ` regex=None ` (the default), the given pat is compiled as a regex only if ` len(p...
R_base_all/R_base_all_245_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) # environment: Environment Access ## Description Get, set, test for and create environments....
R_base_all/weighted-average-excel4_245_0.txt
Reply 51. Not Your Average Analyst says:
R_base_all/weighted-average-excel4_124_0.txt
Hi there, I'm trying to calculate a weighted average in Excel of products that are not in adjacent cells but cannot figure it out. For cells adjacent to each other I use sumproduct but can't find info on how to do it if the cells I need a weighted avg for are not next to each other. IE 100,000(cell A1) units at $5 (...
R_base_all/weighted-average-excel4_274_0.txt
2013 2012 Delta Weighted Change Site A 1003 966 +3.8% 2.6% Site B 307 380 -19.2% -5.0% Site C 85 102 -16.7% 1.2% Total 1,395 1,448 -3.7% -3.7% Here is an example: with the weighted change previously calculated. Now I am trying to determine how to calculate the weighted change with these new figures below. My g...
R_base_all/weighted-average-excel4_128_0.txt
or =SUMPRODUCT((MOD(ROW(A1:A5),4)=1)*(A1:A5)*(B1:B5))/SUMPRODUCT((MOD(ROW(A1:A5),4)=1)*(A1:A5)) or =SUMPRODUCT((MOD(ROW(A1:A5),4)=1)*(A1:A5)*(B1:B5))/SUM((MOD(ROW(A1:A5),4)=1)*(A1:A5)) Ctrl Shift Enter (I've been waiting a while to use those techniques again)
R_base_all/R_base_all_112_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) # ISOdatetime: Date-time Conversion Functions from Numeric Representations ## Description Co...
R_base_all/getting-started-simulating-data8_88_0.txt
group = rep(letters[1:2], ?) We need to repeat the whole vector three times instead of elementwise.
R_base_all/1358206-date-manipulation-volume-weighted-average1_24_0.txt
* Join Date: Mar 2014 * Posts: 1536 * * * * #3
R_base_all/weighted-average-excel4_275_0.txt
SEPT ’12 SEPT ’13 A 102 85 B 970 1,004 C 380 307 D 33 27 Total 1,452 1,396 Reply
R_base_all/getting-started-simulating-data8_46_0.txt
## Example of using the simulated numbers from rpois() Let’s explore the Poisson distribution a little more, seeing how the distribution changes when the mean of the distribution changes. Being able to look at how the Poisson distribution changes with the mean via simulation helped me understand the distribution bett...
R_base_all/R_base_all_207_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) # mean: Arithmetic Mean ## Description Generic function for the (trimmed) arithmetic mean. ...
R_base_all/split-data-frame-string-column-into-multiple-columns0_135_0.txt
10 Here is a base R one liner that overlaps a number of previous solutions, but returns a data.frame with the proper names.
R_base_all/weighted-average-excel4_325_0.txt
How to get Excel to ignore Not Assigned Yet ? Reply
R_base_all/R_base_all_400_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) # strwrap: Wrap Character Strings to Format Paragraphs ## Description Each character string ...
R_base_all/R_base_all_217_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) # order: Ordering Permutation ## Description ` order ` returns a permutation which rearrange...
R_base_all/weighted-average-excel4_131_0.txt
I am trying to find teh weighted average score for a particular student name Dennis, Gina. How can I obtain this using the sumproduct formula if it's on 3 separate rows? Agent Name ACD Calls Avg ACD Avg ACW Avg Hold AHT
R_base_all/split-data-frame-string-column-into-multiple-columns0_198_0.txt
Split string in data frame into two columns 0
R_base_all/R_base_all_198_5.txt
empty value of argument ` open ` . For ` file ` the description is a path to the file to be opened or a complete URL (when it is the same as calling ` url ` ), or ` "" ` (the default) or ` "clipboard" ` (see the ‘Clipboard’ section). Use ` "stdin" ` to refer to the C-level ‘standard input’ of the process (which need n...
R_base_all/R_base_all_410_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) # cut: Convert Numeric to Factor ## Description ` cut ` divides the range of ` x ` into inte...
R_base_all/weighted-average-excel4_158_0.txt
Reply 40. Manu says:
R_base_all/R_base_all_360_2.txt
%B ` Full month name in the current locale. (Also matches abbreviated name on input.) ` %c ` Date and time. Locale-specific on output, ` "%a %b %e %H:%M:%S %Y" ` on input. ` %C ` Century (00--99): the integer part of the year divided by 100. ` %d ` Day of the month as decimal number (01--...
R_base_all/getting-started-simulating-data8_83_0.txt
rep(LETTERS[3:5], each = 2) [1] "C" "C" "D" "D" "E" "E" No, if we use ` each ` then each element is repeated twice and some of the combinations of ` group ` and the new variable will be missing.
R_base_all/weighted-average-excel4_59_0.txt
June 15, 2010 at 12:14 pm Hello Chandoo,
R_base_all/R_base_all_380_2.txt
case ` scan ` returns a list of vectors with the types given by the types of the elements in ` what ` . This provides a way of reading columnar data. If any of the types is ` NULL ` , the corresponding field is skipped (but a ` NULL ` component appears in the result). The type of ` what ` or its components can be one...
R_base_all/R_base_all_200_2.txt
distributions (including the one from which that quote was taken) or sysadmins have chosen to copy a time-zone file to ` localtime ` . For a non-symlink, the ultimate fallback is to compare that file to all files in the time-zone database. Some Linux platforms provide two other mechanisms which are tried in turn befo...
R_base_all/split-data-frame-string-column-into-multiple-columns0_200_0.txt
Splitting a dataframe string column into multiple different columns in the same table 1
R_base_all/getting-started-simulating-data8_100_0.txt
* ` n ` , which is the number of replications to perform. This is to set the number of repeated runs we want. * ` expr ` , the expression that should be run repeatedly. This is often a function.
R_base_all/R_base_all_316_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) # Control: Control Flow ## Description These are the basic control-flow constructs of the R...
R_base_all/R_base_all_198_7.txt
le. Tfile <- file() cat("abc\ndef\n", file = Tfile) readLines(Tfile) close(Tfile) # } # NOT RUN { ## fifo example -- may hang even with OS support for fifos if(capabilities("fifo")) { zzfil <- tempfile(fileext="-fifo") zz <- fifo(zzfil, "w+") writeLines("abc", zz) ...
R_base_all/simulation.html8_2_0.txt
Watch a video of this section Simulation is an important (and big) topic for both statistics and for a variety of other areas where there is a need to introduce randomness. Sometimes you want to implement a statistical procedure that requires random number generation or sampling (i.e. Markov chain Monte Carlo, the boo...
R_base_all/R_base_all_172_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) # args: Argument List of a Function ## Description Displays the argument names and correspon...
R_base_all/weighted-average-excel4_154_0.txt
38. Khalid says: April 3, 2012 at 10:35 am
R_base_all/R_base_all_355_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) # shQuote: Quote Strings for Use in OS Shells ## Description Quote a string to be passed to ...
R_base_all/split-data-frame-string-column-into-multiple-columns0_6_0.txt
company blog 2. 3. Log in 4. Sign up
R_base_all/weighted-average-excel4_17_0.txt
May be your weights are more than 100 percent. Or may be they are less than 100 percent. In both cases, you can use the below formula variation. ` =SUMPRODUCT(B15:B19, C15:C19) / SUM(C15:C19) `
R_base_all/R_base_all_68_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) # prod: Product of Vector Elements ## Description ` prod ` returns the product of all the va...
R_base_all/pandas.Series.str.split.html8_3_0.txt
Site Navigation * Getting started * User Guide * API reference * Development * Release notes
R_base_all/split-data-frame-string-column-into-multiple-columns0_191_0.txt
split a column of string in several columns 0
R_base_all/weighted-average-excel4_164_0.txt
Reply * Manu says:
R_base_all/split-data-frame-string-column-into-multiple-columns0_149_0.txt
answered Feb 17, 2018 at 3:44 jpmorris jpmorris
R_base_all/R_base_all_3_1.txt
ounding: # chol() unlike qr() does not use a tolerance. try(chol(m)) (Q <- chol(m, pivot = TRUE)) ## we can use this by pivot <- attr(Q, "pivot") crossprod(Q[, order(pivot)]) # recover m ## now for a non-positive-definite matrix ( m <- matrix(c(5,-5,-5,3), 2, 2) ) try(chol(...
R_base_all/weighted-average-excel4_326_0.txt
70. Aveek Bose says: January 15, 2016 at 1:59 pm
R_base_all/getting-started-simulating-data8_96_0.txt
data.frame(group = rep(LETTERS[3:4], each = 10), x = runif(n = 15, min = 10, max = 15), y = runif(n = 15, min = 100, max = 150)) Error in data.frame(group = rep(LETTERS[3:4], each = 10), x = runif(n = 15, : arguments imply differing number of rows: 20, 15 B...
R_base_all/ts_moving_averages6_4_0.txt
## Replication Requirements
R_base_all/R_base_all_422_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) # Cstack_info: Report Information on C Stack Size and Usage ## Description Report informatio...
R_base_all/R_base_all_301_1.txt
g/reports/tr10/) ) is likely to be increasingly influential. Where available R by default makes use of ICU ( [ http://site.icu-project.org/ ](http://site.icu-project.org/) ) for collation (except in a C locale). ## See Also ` [ factor ](/link/factor?package=base&version=3.6.2) ` for the behaviour with factor argum...
R_base_all/R_base_all_215_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) # write: Write Data to a File ## Description The data (usually a matrix) ` x ` are written t...
R_base_all/R_base_all_65_2.txt
since deprecated wrappers for ` [ find.package ](/link/find.package?package=base&version=3.6.2) ` and ` [ path.package ](/link/path.package?package=base&version=3.6.2) ` . ## See Also ` [ Defunct ](/link/Defunct?package=base&version=3.6.2) ` , ` [ base- deprecated ](/link/base-deprecated?package=base&version=3.6.2) ...
R_base_all/R_base_all_85_1.txt
tion ](/link/connection?package=base&version=3.6.2) ` : re-encoded connections have some special handling of BOMs). The rest of this section applies when this has not been done so ` x ` starts with a BOM. Implementations will generally interpret a BOM for ` from ` given as one of ` "UCS-2" ` , ` "UTF-16" ` and ` "UTF-...
R_base_all/R_base_all_356_1.txt
e/preview?_tag=rdocs&rdocsPath=packages%2Fbase%2Fversions%2F3.6.2%2Ftopics%2Fdimnames&utm_source=r-docs&utm_medium=docs&utm_term=dimnames&utm_content=run_example_in_workspace) # NOT RUN { ## simple versions of rownames and colnames ## could be defined as follows rownames0 <- function(x) dimna...
R_base_all/index.html6_45_0.txt
M1 | M2 | M3 ---|---|--- 155.2651 | 238.8919 | 24.07884 160.1899 | 244.7838 | 26.29690 156.1196 | 245.0469 | 24.62519 158.9075 | 248.4630 | 26.37611 159.5190 | 243.4377 | 24.76282 165.0315 | 253.6626 | 28.54185 162.6464 | 245.9994 | 25.20926 163.5349 | 254.993...
R_base_all/R_base_all_52_2.txt
. Calling this function in other circumstances will give undefined results. An intrinsic limitation in the ` exit ` argument is that it won't work if the function itself uses ` on.exit ` with ` add= FALSE ` (the default), since the existing calls will override the one supplied by ` trace ` . Tracing does not nest. An...
R_base_all/getting-started-simulating-data8_17_0.txt
Here’s clearer code to do the same thing, where I write out the mean and standard deviation arguments explicitly even though I’m using the default values. It is certainly not necessary to always be this careful, but I don’t think I’ve run into a situation were it was bad to have clear code. rnorm(n = 5, ...
R_base_all/getting-started-simulating-data8_62_0.txt
rep(letters[1:2], times = 3) [1] "a" "b" "a" "b" "a" "b" ## Set the output vector length with the length.out argument
R_base_all/getting-started-simulating-data8_56_0.txt
letters[1:2] [1] "a" "b" And the last 17 ` LETTERS ` .
R_base_all/getting-started-simulating-data8_84_0.txt
This is a job for the ` times ` or ` length.out ` arguments, so the whole vector is repeated. We can repeat the whole vector twice using ` times ` , or via ` length.out = 6 ` . I decided to do the former. In the result below we can see every combination of the two factors is present once.
R_base_all/weighted-average-excel4_55_0.txt
June 15, 2010 at 10:25 am Thanks Chandoo
R_base_all/weighted-average-excel4_333_0.txt
* Hui... says: July 9, 2016 at 2:52 am
R_base_all/weighted-average-excel4_43_0.txt
Recent Articles on Chandoo.org ### Announcing Power BI Dashboard Contest (win $500 prizes!)