Posts by Raphael Nishimura • 170 points
5 posts
-
1
votes1
answer330
viewsA: Even using "na.rm = TRUE" the error message of Missing values appears
The argument na.rm of function svymean refers to missing values in the variable under which you are calculating the average (in your case, the variable basedados$variavel in the first example and…
ranswered Raphael Nishimura 170 -
6
votes3
answers19175
viewsA: How to calculate the average of a column in R?
Assuming the data frame you read from the Excel file is in an object called dados and that you want to add up the values of a column/variable of that named data frame V1, just use the function…
ranswered Raphael Nishimura 170 -
3
votes1
answer197
viewsA: in R, Dec="," does not work in read.csv2
If the goal is only to change the way the output of R displays the decimal separator, you can use: options(OutDec = ",") See the description of the option Outdec in the function help page options…
-
1
votes3
answers192
viewsA: Calculate average distance travelled with single tapply
I don’t know how to do this for both groups (DepDelay > 60 and DepDelay < 60) using a single tapply, but I would do so for each of the groups: tapply(X = hflights[which(hflights$DepDelay >…
ranswered Raphael Nishimura 170 -
1
votes2
answers296
viewsA: What does the "Design has only one Primary sampling Unit" error mean?
This probably means that you declared your sample design as having conglomerates when in reality it does not. If this is the case, when you declare the sample design in the function svydesign(), use…
ranswered Raphael Nishimura 170