Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

您可以使用的 R '轉換' 函式來轉換資料,並將該函式傳遞給 RevoScaleR 'rxDataStepXdf()' 函數。然後,您就可以使用新建立的是,子集的.xdf 檔案與其他的 RevoScaleR 函式。以下是範例 R 指令碼可以建立新的.xdf 檔案隨機取樣較大的.xdf 檔案,使用隱藏的資料列的選取範圍變數 'transformFunc' 中可用。

# Create a transformFunc that selects 25% of the data at random set.seed(13) 
xform <- function(data) { 
data$.rxRowSelection<-as.logical(rbinom(length(data[[1]]),1,.25)) 
return(data) 

rxDataStepXdf(inFile=inFile, outFile="sampledData.xdf", transformFunc=xform, overwrite=TRUE) 
# check that subsetting was done and the row selection variable is not kept in the data set. 
rxGetInfoXdf(inFile) 
rxGetInfoXdf("sampledData.xdf") 

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×