Комментарии:
Hey, great explaination
I have a question, like how can we transform data to have each statistic shown in one column?
I have a data set which requiring cleaning
hi how would you create averages between numbers instead of adding them together
ОтветитьHi! I got a question here, which I failed to find something online.
I have a huge database in which two questions are Yes/No-Questions.
Example:
Person | Q1 | Q2
1 Yes No
2 No Yes
3 Yes Yes
4 No No
5 No Yes
I want to create a dataframe which groups the participants in the possible combination of answers.
Y, Y = 1 = 20%
Y, N = 1 = 20%
N,Y = 2 = 40%
N,N = 1 = 20%
So I want to count the combination of possible answers and then add a column containing the percentage.
Does anyone have a clue how I can do this in one dataframe/table? I only was able to make three different ones and then see how many observations suit my criteria. I cannot display them yet.
Thanks in advance :-D
Nice
ОтветитьThank you so much! This is so helpful!
ОтветитьHi, and thanks for your videos! I'm just approaching R and I have a very simple problem here: let's imagine that there is some missing value (NA) in x1 or x2. When summing x1 and x2, in x3 we will find a NA, as 3+NA = NA.
How can I tell R to ignore the missing value, so that 3+NA = 3 ??
I found the na.rn=TRUE function, but I don't know where to put it. Could you please give me a hint?
Thanks in advance!
Thank you very much! I love your videos! For method 2: would it work with %>% from tidyverse? I believe we can do this with tidyverse, what would be the best method? I need to create a new df based on the collums from my actual df
ОтветитьGreat video, thanks!
ОтветитьA very clear useful video.thanks..
ОтветитьThankyou for a very clear and concise explanation. Are there any circumstances when you would prefer one method to the other?
Ответитьnice. we can also use mutate function in dplyr package
Ответить