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.

您可以使用 userObjects 引數,以及轉換引數,從您的全域環境 (或目前的搜尋路徑中的其他環境) 中的物件建立新的變數。

例如,假設您想要估計為相依變數中,使用 wage 收入 「 線性模式,而想要包含狀態層級的上做為其中一個自變數的教育 per capita 費用。我們可以定義具名的向量包含這個狀態層級的資料,如下所示︰

educExp <-c (Connecticut = 1795.57,華盛頓 = 1170.46,印第安那 = 1289.66)

我們接著可以使用 rxDataStepXdf 將 per capita 教育費用新增為新的變數使用轉型引數,將 educExp 傳遞給 userObjects 引數為具名的清單︰

censusWorkers <-file.path(rxGetOption("sampleDataDir"),"censusWorkers.xdf") rxDataStepXdf (inFile = censusWorkers,outFile ="censusWorkersWithEduc",轉換 = 清單 (stateEducExpPC = educExp [符合 (狀態、 names(educExp))])、 transformVars = 「 狀態 」,userObjects=list(educExp=educExp))

RxGetInfoXdf 函式會顯示新增的變數︰

rxGetInfo("censusWorkersWithEduc.xdf",getVarInfo=TRUE) 

這個範例和其他包含在 RevoScaleR 使用者指南中,選取 [說明-R 手冊 (PDF) 從革命 R 企業功能表存取。

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!

×