简体   繁体   English

R LANGUAGE:已注册的 S3 方法被“data.table”覆盖:

[英]R LANGUAGE: Registered S3 method overwritten by 'data.table':

I'm using 3.6.3 R version.我正在使用 3.6.3 R 版本。 while compiling R.mrd i got this errors: Registered S3 method overwritten by 'data.table': method from print.data.table
Registered S3 method overwritten by 'htmlwidgets': method from
print.htmlwidget tools:rstudio Registered S3 method overwritten by 'dplyr': method from print.rowwise_df le package �flexdashboard� a �t� compil� avec la version R 3.6.3Registered S3 methods overwritten by 'htmltools': method from
print.html tools:rstudio print.shiny.tag tools:rstudio print.shiny.tag.list tools:rstudio
编译 R.mrd 时出现此错误: Registered S3 method overwritten by 'data.table': method from print.data.table
Registered S3 method overwritten by 'htmlwidgets': method from
print.htmlwidget tools:rstudio Registered S3 method overwritten by 'dplyr': method from print.rowwise_df le package �flexdashboard� a �t� compil� avec la version R 3.6.3Registered S3 methods overwritten by 'htmltools': method from
print.html tools:rstudio print.shiny.tag tools:rstudio print.shiny.tag.list tools:rstudio
Registered S3 method overwritten by 'data.table': method from print.data.table
Registered S3 method overwritten by 'htmlwidgets': method from
print.htmlwidget tools:rstudio Registered S3 method overwritten by 'dplyr': method from print.rowwise_df le package �flexdashboard� a �t� compil� avec la version R 3.6.3Registered S3 methods overwritten by 'htmltools': method from
print.html tools:rstudio print.shiny.tag tools:rstudio print.shiny.tag.list tools:rstudio
Registered S3 method overwritten by 'data.table': method from print.data.table
Registered S3 method overwritten by 'htmlwidgets': method from
print.htmlwidget tools:rstudio Registered S3 method overwritten by 'dplyr': method from print.rowwise_df le package �flexdashboard� a �t� compil� avec la version R 3.6.3Registered S3 methods overwritten by 'htmltools': method from
print.html tools:rstudio print.shiny.tag tools:rstudio print.shiny.tag.list tools:rstudio
Therefore plots didn't appear in a dashboard.
Registered S3 method overwritten by 'data.table': method from print.data.table
Registered S3 method overwritten by 'htmlwidgets': method from
print.htmlwidget tools:rstudio Registered S3 method overwritten by 'dplyr': method from print.rowwise_df le package �flexdashboard� a �t� compil� avec la version R 3.6.3Registered S3 methods overwritten by 'htmltools': method from
print.html tools:rstudio print.shiny.tag tools:rstudio print.shiny.tag.list tools:rstudio
因此图表没有出现在仪表板中。
Any help please请提供任何帮助

This is usually caused by multiple packages having the same named functions.这通常是由具有相同命名函数的多个包引起的。 Have a look at this answer - it offers some insight into your query https://stackoverflow.com/a/59093803/8158951看看这个答案 - 它为您的查询提供了一些洞察力https://stackoverflow.com/a/59093803/8158951

In your case, the last loaded package is taking precedence for the function name of the one you need to plot.在您的情况下,最后加载的包优先于您需要绘制的函数名称。

It would assist if you can provide a reproducible example with the code you are using, but I'll try and provide some guidance.如果您可以使用您正在使用的代码提供一个可重现的示例,这将有所帮助,但我会尝试提供一些指导。

Where duplicate function names occur, R provides a warning like the one you refer to above.在出现重复函数名称的情况下,R 会提供类似于您上面提到的警告。 This can be mitigated by adding the name of the required package before the function call as follows PackageName::FunctionName .这可以通过在函数调用之前添加所需包的名称来缓解,如下所示PackageName::FunctionName

If plotting is an issue for you, and assuming you are using ggplot, you could try this:如果绘图对您来说是个问题,并且假设您使用的是 ggplot,您可以试试这个:

ggplot2::ggplot()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM