[education/rkward/snippets] rkward: Merge branch 'snippets' of https://invent.kde.org/education/rkward into snippets

Stefan Rödiger null at kde.org
Sun Jun 19 12:34:49 BST 2022


Git commit 2171b6e2e024654b632688eaa2de803b66581647 by Stefan Rödiger.
Committed on 19/06/2022 at 11:34.
Pushed by srodiger into branch 'snippets'.

Merge branch 'snippets' of https://invent.kde.org/education/rkward into snippets

M  +20   -11   rkward/RKWardR.xml
M  +8    -2    rkward/RKWardYAML.xml

https://invent.kde.org/education/rkward/commit/2171b6e2e024654b632688eaa2de803b66581647

diff --cc rkward/RKWardR.xml
index 56b9c11b,84571b9a..6aa34023
--- a/rkward/RKWardR.xml
+++ b/rkward/RKWardR.xml
@@@ -50,9 -50,9 +50,9 @@@ par(mf­row­=c(­3,3)
    </fillin>
   </item>
   <item>
-   <match>Concat­enate vectors after converting to character</match>
+   <match>Concat­enate character vectors</match>
    <fillin>
- paste(…, sep = " ", collapse = NULL)
 -paste({cursor}, sep = " ", collapse = NULL)
++paste(${cursor}, sep = " ", collapse = NULL)
    </fillin>
   </item>
   <item>
@@@ -73,22 -82,13 +82,22 @@@ while (condi­tion) 
    </fillin>
   </item>
   <item>
-   <match>ifelse statement</match>
+   <match>if/else statement</match>
    <fillin>
- if (condi­tion){
+ if (condi­tion) {
      Do something
-     } else {
+ } else {
      Do something different
-     }
+ }
    </fillin>
   </item>
 + <item>
-   <match>data.frame</match>
++ <match>data.frame</match>
 +  <fillin>${rangeCommand("data.frame(%%1, row.names = NULL, check.rows = FALSE, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE)", "Data object")}
 +  </fillin>
 + </item>
-   <item>
++ <item>
 +  <match>Combine Values into a Vector or List</match>
 +  <fillin>${rangeCommand("c(%%1, recursive = FALSE, use.names = TRUE)", "Objects to be concatenated")}</fillin>
 + </item>
   </snippets>
diff --cc rkward/RKWardYAML.xml
index c04339fa,c04339fa..76ac95ef
--- a/rkward/RKWardYAML.xml
+++ b/rkward/RKWardYAML.xml
@@@ -32,8 -32,8 +32,8 @@@ function rangeCommand(command, def) 
    <match>YAML header</match>
      <fillin>
  ---
--title: "YAML header for Rmarkdown"
--author: "John Doe"
++title: "Document title"
++author: "Author Name"
  date: "`r Sys.Date()`"
  output:
      html_document:
@@@ -44,4 -44,4 +44,10 @@@
  ---
      </fillin>
   </item>
++ <item>
++  <match>YAML header</match>
++    <fillin>
++
++    </fillin>
++ </item>
  </snippets>


More information about the rkward-tracker mailing list