Skip to main content Link Search Menu Expand Document (external link)

Procedure 12: Specifying columns of a Data Frame to return

The select() function returns just the columns specified after the data frame. In this example, the AAPL data frame will be have some columns truncated leaving only the columns Interim_Buffer_Date and Interim_Close:

AAPL <- select(AAPL,Symbol,Interim_Buffer_Date,Interim_Close)

img.png

Run the line of script to console:

img_1.png

View the data frame:

View(AAPL)

img_2.png

Run the line of script to console:

img_3.png

It can be observed that the data frame has discarded columns that were not specified explicitly.


Jube™. © Jube Holdings Limited 2022 to present.