You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/units/_unit05/unit05-05_best_scripting.md
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,17 @@ At the moment there don't seem to be any real advantages to using functions inst
10
10
However, we also notice that we still have to do a lot of preprocessing and already the control files are starting to get cluttered.
11
11
Therefore it makes sense to separate and generalize some repetitive functionalities. For example, the preprocessing of the lidar data up to the correct setup of the catalog.
12
12
13
+
Keep in mind we should go one step further and [follow Hadley Wickham's explanation](https://r4ds.had.co.nz/functions.html#when-should-you-write-a-function) when you should write a function?
14
+
13
15
## Splitting up the control file
14
-
First we split up the control files to reduce clarify structure and reduce the cycling of setting up the environment preprocessing data and so on.
15
-
It is a good practice to separate at least data preprocessing and data analysis. Furthermore all code that runs more than once should be a function.
16
+
However we start simply with splitting up the control files to clarify the structure and reduce the redundant repetitions.
17
+
18
+
It is a good practice to separate at least setup of a projet, data pre-processing, data analysis and the presentation of the results.
19
+
{: .notice--success}
16
20
17
-
This seperation means that we need a kind of a master control script or usecase.
21
+
This separation means that we need a kind of a master control script that rules the workflow and provides general settings.
18
22
19
-
We start bottom up. First we transform the clipping nto a function.
23
+
We start bottom up. First we transform the clipping into a function.
20
24
21
25
22
26
### Seperating the clipping of an arbitrary Area of Interest from LAS data
0 commit comments