For example i have the data “daten”, there are patients having different diseases and i want to know how many patients there are with kidney disease? Can i count the patient-id of patients with kidney disease an how can i do that?
Keep in mind that R is case sensitive – I think your primary problem is that you’ve capitalized the “D” and not the “B” in “doBy”. But the warnings suggest that you might be having trouble with your internet connection as well. Checking/fixing those two things should fix it.
That’s true, the base summary function will work. I’ve gotten in the habit of using the doBy package because it has a few other functions that are helpful, too, but for a simple grouping what you have is fine.
Do you mean you want to select cases where TZE_D_LOK begins with “^C51”, such as “^C51A”, “^C51B”, “^C51C”…?
In that case you can use grep. This is untested, but something like this should work:
summary(TZE_D_LOK, data = daten[grepl(pattern="^C51", x=daten$TZE_D_LOK, fixed=TRUE),], FUN = length)