Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in retrieving help of aov_* in RStudio #66

Closed
psychelzh opened this issue Apr 8, 2019 · 12 comments
Closed

Error in retrieving help of aov_* in RStudio #66

psychelzh opened this issue Apr 8, 2019 · 12 comments

Comments

@psychelzh
Copy link

psychelzh commented Apr 8, 2019

When typing aov_ in RStudio the following window pops up, suggesting there is an error in help document.

image

Error messages:

Error in substring(html, match + 6, match + attr(match, "match.length") -  : 
  invalid multibyte string at '<98>*<2a>*鈥<99> 0.001 鈥<98>**鈥<99> 0.01 鈥<98>*鈥<99> 0.05 鈥<98>+鈥<99> 0.1 鈥<98> 鈥<99> 1

# "numeric" variables are per default converted to factors (as long as factorize = TRUE):
obk.long$hour2 &lt;- as.numeric(as.character(obk.long$hour))

# gives same results as calls before
aov_car(value ~ treatment * gender + Error(id/phase*hour2), 
        data = obk.long, observed = c("gender"))


# ANCOVA: adding a covariate (necessary to set factorize = FALSE)
aov_car(value ~ treatment * gender + age + Error(id/(phase*hour)), 
        data = obk.long, observed = c("gender", "age"), factorize = FALSE)

aov_4(value ~ treatment * gender + age + (phase*hour|id), 
        data = obk.long, observed = c("gender", "age"), factorize = FALSE)

aov_ez("id", "value", obk.long, between = c("treatment", "gender"), 
        within = c("phase", "hour"), covariate = "age", 
        observed = c("gender", "age"), factorize = FALSE)


# aggregating over one within-su

Session Information:

sessioninfo::session_info()
#> - Session info ----------------------------------------------------------
#>  setting  value                         
#>  version  R version 3.5.3 (2019-03-11)  
#>  os       Windows 10 x64                
#>  system   x86_64, mingw32               
#>  ui       RTerm                         
#>  language (EN)                          
#>  collate  Chinese (Simplified)_China.936
#>  ctype    Chinese (Simplified)_China.936
#>  tz       Asia/Taipei                   
#>  date     2019-04-08                    
#> 
#> - Packages --------------------------------------------------------------
#>  package     * version date       lib source        
#>  assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.5.3)
#>  cli           1.1.0   2019-03-19 [1] CRAN (R 3.5.3)
#>  crayon        1.3.4   2017-09-16 [1] CRAN (R 3.5.0)
#>  digest        0.6.18  2018-10-10 [1] CRAN (R 3.5.1)
#>  evaluate      0.13    2019-02-12 [1] CRAN (R 3.5.2)
#>  highr         0.8     2019-03-20 [1] CRAN (R 3.5.3)
#>  htmltools     0.3.6   2017-04-28 [1] CRAN (R 3.5.0)
#>  knitr         1.22    2019-03-08 [1] CRAN (R 3.5.3)
#>  magrittr      1.5     2014-11-22 [1] CRAN (R 3.5.0)
#>  Rcpp          1.0.1   2019-03-17 [1] CRAN (R 3.5.3)
#>  rmarkdown     1.12    2019-03-14 [1] CRAN (R 3.5.2)
#>  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.5.1)
#>  stringi       1.4.3   2019-03-12 [1] CRAN (R 3.5.2)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 3.5.2)
#>  withr         2.1.2   2018-03-15 [1] CRAN (R 3.5.0)
#>  xfun          0.6     2019-04-02 [1] CRAN (R 3.5.3)
#>  yaml          2.2.0   2018-07-25 [1] CRAN (R 3.5.1)
#> 
#> [1] C:/Users/liang/Documents/R/win-library/3.5
#> [2] C:/Program Files/R/R-3.5.3/library

Created on 2019-04-08 by the reprex package (v0.2.1)

@psychelzh
Copy link
Author

I suspect that there might a document file encoding not supported.

singmann added a commit that referenced this issue Jul 14, 2019
@singmann
Copy link
Owner

Sorry for the slow reply, but I have now attempted to address this by changing the problematic line by hand.

It is changed now in the development version. Can you let me know if the problem still appears after installing it?

@psychelzh
Copy link
Author

Now the error message is:

Error in substring(html, match + 6, match + attr(match, "match.length") -  : 
  invalid multibyte string at '<99> <61>nd 'data.frame':	15 obs. of  6 variables:
#  $ aov        :List of 5
#  $ Anova      :List of 14
#  $ lm         :List of 13
#  $ data       :List of 3

obk_anova$Anova
## Type II Repeated Measures MANOVA Tests: Pillai test statistic
##                             Df test stat approx F num Df den Df       Pr(&gt;F)    
## (Intercept)                  1     0.970      318      1     10 0.0000000065 ***
## treatment                    2     0.481        5      2     10      0.03769 *  
## gender                       1     0.204        3      1     10      0.14097    
## treatment:gender             2     0.364        3      2     10      0.10447    
## phase                        1     0.851       26      2      9      0.00019 ***
## treatment:phase              2     0.685        3      4     20      0.06674 .  
## gender:phase                 1     0.043        0      2      9      0.82000    
## treatment:gender:phase       2     0.311
Error in substring(html, match + 6, match + attr(match, "match.length") -  : 
  invalid multibyte string at '<99> <61>nd 'data.frame':	15 obs. of  6 variables:
#  $ aov        :List of 5
#  $ Anova      :List of 14
#  $ lm         :List of 13
#  $ data       :List of 3

obk_anova$Anova
## Type II Repeated Measures MANOVA Tests: Pillai test statistic
##                             Df test stat approx F num Df den Df       Pr(&gt;F)    
## (Intercept)                  1     0.970      318      1     10 0.0000000065 ***
## treatment                    2     0.481        5      2     10      0.03769 *  
## gender                       1     0.204        3      1     10      0.14097    
## treatment:gender             2     0.364        3      2     10      0.10447    
## phase                        1     0.851       26      2      9      0.00019 ***
## treatment:phase              2     0.685        3      4     20      0.06674 .  
## gender:phase                 1     0.043        0      2      9      0.82000    
## treatment:gender:phase       2     0.311

@singmann
Copy link
Owner

Does the same error occur for ?mixed, ?afex_plot, ?`afex-package`, md_12.1, and ?sk2011.2?

Does it also occur with the latest version of RStudio? https://www.rstudio.com/products/rstudio/download/preview/

I understand that this is an annoying problem, but it does not seem to be an optimal solution for me to remove all non-ASCII characters if there is another way.

@psychelzh
Copy link
Author

The same error occurs for ?mixed, but not for the rest.

@singmann
Copy link
Owner

Can you try again? I removed those characters.

@psychelzh
Copy link
Author

This time is this:

image

@singmann
Copy link
Owner

That seems to be an installation error. Can you restart R and reinstall afex and check again?

@psychelzh
Copy link
Author

Done! Seemingly there is no more error message now. Thank you very much!

@psychelzh
Copy link
Author

BTW, how about these messages when loading? Is it okay?

Registered S3 methods overwritten by 'car':
  method                          from
  influence.merMod                lme4
  cooks.distance.influence.merMod lme4
  dfbeta.influence.merMod         lme4
  dfbetas.influence.merMod        lme4

@singmann
Copy link
Owner

This is neither an error nor a warning. Further, afex is not responsible for that directly.

@psychelzh
Copy link
Author

Yeah, it is from car package. I think it is okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants