Description Usage Arguments Value Examples
View source: R/shift_row_values.R
Shift row values left or right
1 | shift_row_values(.data, .dir = "left", at = NULL)
|
.data |
a table of data. |
.dir |
the shift direction as a string, one of "left" or "right". |
at |
the row indices at which to shift. |
a data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
# A tibble: 4 x 7
s t u v x y z
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int>
1 5 1 1 NA NA NA NA
2 1 1 5 2 NA NA NA
3 1 2 9 6 8 3 NA
4 5 2 7 4 NA NA NA
# A tibble: 4 x 7
s t u v x y z
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int>
1 5 1 1 NA NA NA NA
2 1 1 5 2 NA NA NA
3 1 2 9 6 8 3 NA
4 NA NA 5 2 7 NA 4
# A tibble: 4 x 7
s t u v x y z
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <int>
1 NA NA NA NA 5 1 1
2 NA NA NA 1 1 5 2
3 NA 1 2 9 6 8 3
4 NA NA 5 2 7 NA 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.