These classes are just great. Really helpful! Thanks a lot!
@weecology Жыл бұрын
Thanks! So glad they are helpful!
@BridgeTROLL777 Жыл бұрын
great content! Thank you :)
@FaithMueniKioko2 ай бұрын
am looking at the data which i want to see the children how have never gotten every vaccination and i on want to select the row with variable "no" in 26 columns how can i go about it
@weecologyАй бұрын
If the columns are all next to one another you can use something like: filter(dataframe, across(10:36, ~ . == "no")) Where 10 is the column number of the first column in the block and 36 is the number of the last column in the block. If they aren't all grouped together you can still use across, but you have to name the columns: df_filtered % filter(across(c(col1, col2, col3, col4, ... col26), ~ . == "no"))
@zainabkhan24752 жыл бұрын
thanks a lot!
@CanDoSo_org2 жыл бұрын
Hi, can we filter species_id all start with "D" with *? thanks.
@weecology2 жыл бұрын
You can do this by combing dplyr with the stringr package. E.g.,: library(dplyr) library(stringr) df = data.frame(species = c("DM", "DO", "PP"), count = c(1, 2, 3)) filter(df, str_detect(species, "^D")) The ^D means "starts with D"
@CanDoSo_org2 жыл бұрын
@@weecology Many thanks. "filter(grepl("D", species,)) " works as well.😀
@NayeonGoddes10 ай бұрын
This code always return to me 0 observations and 12 variables, I don't know why, I don't know what to do
@weecology10 ай бұрын
Can you paste the specific code here that isn’t working the way you expect?
@NayeonGoddes10 ай бұрын
@@weecology SampleRancagua = filter(SUBSET, Comuna == "Graneros") Thank youuu :(
@weecology10 ай бұрын
OK, so just to check. SUBSET is a a data frame, it has a column named Comuna, and there is at least one row in that column where the value is “Graneros”?
@weecology10 ай бұрын
The most common cause of zero rows returned is either a typo in the value given in “” or a difference in the capitalization, since either of these can result in no matches