mirror of
https://github.com/dchakro/shared_Rscripts.git
synced 2026-05-18 09:14:44 -07:00
add snippet to write table
This commit is contained in:
parent
56329ecab0
commit
80bac34890
1 changed files with 11 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ snippet fun
|
|||
${0}
|
||||
}
|
||||
|
||||
snippet readData
|
||||
snippet readTable
|
||||
myDT <- data.table::fread(file = ${1:fileName},
|
||||
sep = "${2:delimiter}",
|
||||
skip = 0,
|
||||
|
|
@ -64,6 +64,16 @@ snippet readData
|
|||
nThread = `r as.integer(system(command = "sysctl -n hw.physicalcpu", intern = T))`)
|
||||
${0}
|
||||
|
||||
snippet writeTable
|
||||
write.table(
|
||||
x = ${1:TableVar},
|
||||
file = ${2:fileName},
|
||||
quote = F,
|
||||
sep = "${3:delimiter}",
|
||||
row.names = F,
|
||||
col.names = T)
|
||||
${0}
|
||||
|
||||
snippet gsubstitute
|
||||
gsub("${1:Find}","${2:Replace}",${3:variable}, fixed = T)
|
||||
${0}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue