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
Identify missing observations unbalanced panelDear Stata users, I have an unbalanced panel data set with the following variables: id, year, nobirt…
Extracting the numbers after repeated characters in a string variableHello, I am trying to obtain the distance between two geographic locations using public transportat…
Create a new variable that count for the number of observations of a variable for the previous yearHello everyone, I have trouble creating a new variable with my data. In my data every event_date co…
Split issueI have a dataset with data by Congressional district: . dataex congdist in 1/5 Code: * Example …
How to report t-stat of sum of coefficient in journal/thesisDear all, I would like to report the sum of coefficient of interaction term and normal variables, in…
Subscribe to:
Post Comments (Atom)
0 Response to Automating the process of copying and pasting in STATA
Post a Comment