Along the line of @Hadley’s solution, but using the environment of the namespace, how about:
environment(myfun) <- asNamespace('stats')
More Related Contents:
- How to load packages in R automatically?
- Can’t download data from Yahoo Finance using Quantmod in R
- Creating a local R package repository
- How can I document data sets with roxygen?
- Show names of everything in a package
- Configuring compilers on Apple silicon (Big Sur, Monterey, Ventura) for Rcpp and other tools
- Convert an upper to lower triangle matrix in r [duplicate]
- How to reshape data from long to wide format
- Difference between the == and %in% operators in R [duplicate]
- Cumulatively paste (concatenate) values grouped by another variable
- Dplyr join on by=(a = b), where a and b are variables containing strings?
- plotting smooth line through all data points
- Break X Axis in R
- Extract data from a ggplot
- pass function arguments to both dplyr and ggplot
- What’s the use of which?
- Replace logical values (TRUE / FALSE) with numeric (1 / 0)
- Removing one tableGrob when applied to a box plot with a facet_wrap
- In R, how do I add a max by group? [duplicate]
- Saving grid.arrange() plot to file
- How to plot a Stacked and grouped bar chart in ggplot?
- Ordering in r plotly barchart
- Overlay two ggplot2 stat_density2d plots with alpha channels
- Sort legend in ggplot2
- Leaflet Legend for Custom Markers in R
- Preserve proportion of graphs using grid.arrange
- Remove unused factor levels from a ggplot bar plot
- Knit one markdown file to two output files
- given value of matrix, getting it’s coordinate
- Display HTML file in Shiny App