问题
This seems very helpful but I'm having trouble doing it. If I type car:::scatter.default it returns: Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : object 'scatter.default' not found, but car:::scatter3d.default returns the entire function. Do I edit scatter3d.default? When I add the if (axis.scales) code to scatter3d.default I get an error saying: Error in match.arg(id.method) : object 'id.method' not found? Do you have the full version of the code edits that I could use?
回答1:
Try this:
library(car)
source(url("http://www.math.mcmaster.ca/bolker/R/misc/scatter3d.R"))
scatter3d(prestige ~ income + education, data=Duncan)
You could also use download.file to grab the file and source() it locally.
来源:https://stackoverflow.com/questions/8231007/having-trouble-executing-the-edits-to-scatter3d-default