dplyr(版本0.4.1)打印执行连接的colnames.是否可以关闭此选项?
R代码:
library(dplyr)
a=data.frame(x=1,y=2)
b=data.frame(x=1,z=10)
aa=inner_join(a,b)
Run Code Online (Sandbox Code Playgroud)
对于最后一行,dplyr打印:
Joining by: "x"
Run Code Online (Sandbox Code Playgroud)
这对于交互式工作很有用,但是我在Rscript中运行并且所有这些线都堵塞了我的屏幕.
让我们假设以下代码(来自管道上的 imblearn 示例)
...
# Instanciate a PCA object for the sake of easy visualisation
pca = PCA(n_components=2)
# Create the samplers
enn = EditedNearestNeighbours()
renn = RepeatedEditedNearestNeighbours()
# Create the classifier
knn = KNN(1)
# Make the splits
X_train, X_test, y_train, y_test = tts(X, y, random_state=42)
# Add one transformers and two samplers in the pipeline object
pipeline = make_pipeline(pca, enn, renn, knn)
pipeline.fit(X_train, y_train)
y_hat = pipeline.predict(X_test)
Run Code Online (Sandbox Code Playgroud)
我希望在执行时就能确定pipeline.predict(X_test)的抽样程序enn和renn不会被执行(但当然pca必须执行)。 …