Hi,
I am trying to copy and paste the first 20 observation onto a new column but the values start at the 10th row and not the first row. I tried manually copying and pasting it by clicking and selecting the observations and finally pasting them to the selected cells in the new column but it seems rather time consuming, especially since I am doing it for multiple columns at a single time. Here is an example of my dataset:
Array
As you can see, I want the data from the first 20 rows in the column "mergeddata" to be inputted into the second column "mergeddate_01" but the data has to start at the 10th row instead of the first row. What I did so far was to select the first 20 observations by clicking the cells and pasting it to the new column at the 10th row but this process is time-consuming if there are many columns to be created. For the third column, I intend to have observations from the 40th observation in the first column onwards but the data to start at the 21st row instead of the first row. Is there a STATA command to automate the process? I am using the STATA version 16 and any help would be appreciated. Thanks!
Related Posts with Automating the process of copying and pasting in STATA
Creating a binary varible from a date variableI would like to create a variable where there is only two variables (0=heating, 1=non-heating) I ha…
How to execute a Matlab script from StataHi all, I'd like to run a Matlab script from within my Stata Do-File. Haven't done this before, but…
Minutes off in datetime formattingHello, I am working on a load profile with 30-minute invervals of electricity demand that I wish to…
Adoupdate not working in new installationDear users, I recently installed Stata 15 in a new machine with Windows 10. I first download -ftools…
Combine cases, but keep values from each.I'd like to combine cases, but in an unusual way -- by keeping values from each. For example, start …
Subscribe to:
Post Comments (Atom)
0 Response to Automating the process of copying and pasting in STATA
Post a Comment