write.neuron | R Documentation |
If file is not specified the neuron's InputFileName field will be checked
(for a dotprops object it will be the 'file'
attribute). If this is
missing there will be an error. If dir is specified it will be combined with
basename(file). If file is specified but format is not, it will be inferred
from file's extension.
write.neuron(
n,
file = NULL,
dir = NULL,
format = NULL,
ext = NULL,
Force = FALSE,
MakeDir = TRUE,
...
)
n |
A neuron |
file |
Path to output file |
dir |
Path to directory (this will replace dirname(file) if specified) |
format |
Unique abbreviation of one of the registered file formats for neurons including 'swc', 'hxlineset', 'hxskel' |
ext |
Will replace the default extension for the filetype and should
include the period eg |
Force |
Whether to overwrite an existing file |
MakeDir |
Whether to create directory implied by |
... |
Additional arguments passed to selected writer function |
Note that if file
does not have an extension then the default
extension for the specified format
will be appended. This behaviour
can be suppressed by setting ext=NA
.
return value
write.neuron
, fileformats
,
saveRDS
# show the currently registered file formats that we can write
fileformats(class='neuron', write=TRUE)
## Not run:
write.neuron(Cell07PNs[[1]], file='myneuron.swc')
# writes out "myneuron.swc" in SWC format
write.neuron(Cell07PNs[[1]], format = 'hxlineset', file='myneuron.amiramesh')
# writes out "myneuron.amiramesh" in Amira hxlineset format
write.neuron(Cell07PNs[[1]], format = 'hxlineset', file='myneuron')
# writes out "myneuron.am" in Amira hxlineset format
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.