Relative Content

Tag Archive for rdplyrfilter

Filtering specific sequences in R

I am trying to filter a dataset I have obtained after RNASeq Analysis. I have "Sequence Name” assigned to "topological domain" and “transmembrane region”. I would like to filter out all those sequences that contain a "topological domain" and "transmembrane region" but keep the ones containing only "topological domain".

Dplyr Filter Error `mean.default()`:! argument is not numeric or logical: returning NA

`sf <- sf |> dplyr::select(n_number, s_date) |> dplyr::filter( s_date == mean(s_date), .by = n_number)` There was 1 warning in dplyr::filter().ℹ In argument: s_date == mean(s_date).Caused by warning in mean.default():! argument is not numeric or logical: returning NA I try to find out the first occurance date for each s_number. The data is like this | […]

R – Filter Function

sf <- sf |> dplyr::select(number, date) |> dplyr::group_by(number) |> dplyr::filter(date == mean(date), .by = npi_number`your text`) I try to use dplyr filter function to group the number by their min date. but i keep getting this warning message. Warning message:There was 1 warning in dplyr::filter().ℹ In argument: date == mean(date).Caused by warning in mean.default():! argument […]