From the course: SQL Server Machine Learning Services: R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Select values from a data frame

Select values from a data frame

From the course: SQL Server Machine Learning Services: R

Start my 1-month free trial

Select values from a data frame

- [narrator] Once our data is imported from SQL Server into an R data frame, we can work with individual values using the same single square bracket operator, that we used when working with vectors. The only difference is that vectors are one dimensional, just a single column. The data frame has two dimensions, rows and columns. Let's continue working with the same country data. And I've already got the input data coming from a select query, and the output data set is set up with the schema for the final result. First, I'm going to send the input data right back to the output. On line number four, we can do that by assigning the output data set variable the values directly from the input data set. Make sure you're still targeting the wide world importers database and execute the query. SQL server will fetch the data from the table through the query, pass that information into R, then R copies that data to the output data…

Contents