hey all,
i have used distinct function to delete the duplicate rows, but later i want to use those deleted rows again (deleted rows must be saved in seperate data frame) please guide wat to do.
df <- tibble(
x = sample(10, 10, rep = TRUE),
y = sample(10, 10, rep = TRUE)
)
#> Error in tibble(x = sample(10, 10, rep = TRUE), y = sample(10, 10, rep = TRUE)): could not find function "tibble"
df
#> function (x, df1, df2, ncp, log = FALSE)
#> {
#> if (missing(ncp))
#> .Call(C_df, x, df1, df2, log)
#> else .Call(C_dnf, x, df1, df2, ncp, log)
#> }
#> <bytecode: 0x00000000137c4c58>
#> <environment: namespace:stats>
nrow(df)
#> NULL
nrow(distinct(df))
#> Error in distinct(df): could not find function "distinct"
nrow(distinct(df, x, y))
#> Error in distinct(df, x, y): could not find function "distinct"
distinct(df, x)
#> Error in distinct(df, x): could not find function "distinct"
distinct(df, y)
#> Error in distinct(df, y): could not find function "distinct"