Learn R Programming

yfR (version 1.1.0)

yf_convert_to_wide: Transforms a long (stacked) data frame into a list of wide data frames

Description

Transforms a long (stacked) data frame into a list of wide data frames

Usage

yf_convert_to_wide(df_in)

Value

A list with dataframes in the wide format (each element is a different column)

Arguments

df_in

dataframe in the long format (probably the output of yf_get())

Examples

Run this code

my_f <- system.file("extdata/example_data_yfR.rds", package = "yfR")
df_tickers <- readRDS(my_f)

print(df_tickers)

l_wide <- yf_convert_to_wide(df_tickers)
l_wide

Run the code above in your browser using DataLab