[R] Long Format data

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Thu Aug 5 11:53:17 CEST 2021

Hi Admire,
I think rep_n_stack in the prettyR package may do what you want:

# download and install the prettyR package
# load the prettyR package
# read in your data
# convert the values you want to long format
# as your column names in Excel will be coerced to character values by
prepending "X",
# coerce them back to numeric
# check the first row

As the "Variables" column is messy, you may want to substitute the
numeric value in the long output and print a table of the numeric and
character values of the factor:



On Tue, Aug 3, 2021 at 9:53 PM Admire Tarisirayi Chirume
<atchirume using gmail.com> wrote:
> Hello Jim, i hope you are well. I think my msg was rejected beacuse of the size of my files. I was kindly help me to structure data in the folder attached herewith in file BOP_All_Countries.csv. I am doing panel data analysis. I need it to be structured as it is on the file R_help.csv.
> Please kindly see the r-script below (r_help.R) that i ran which did not yield what i wanted.
> Thank you in advance for your help.
> Alternative email: addtarris using icloud.com/TChirume using rbz.co.zw
> Skype: admirechirume
> Call: +263773369884
> whatsapp: +818099861504

More information about the R-help mailing list