sosConvertString(sos4R)
sosConvertString()所属R语言包:sos4R
SOS Conversion functions for Observation Results
观测结果的SOS转换功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions are called by the parsers of om:Observation and om:Measurement documents to convert the actual values to the correct classes.
这些功能被称为OM的解析器:观察和OM:测量的文件转换成实际的值到正确的类别。
用法----------Usage----------
sosConvertString(x, sos)
sosConvertDouble(x, sos)
sosConvertTime(x, sos)
sosConvertLogical(x, sos)
参数----------Arguments----------
参数:x
The object to be converted.
要被转换的对象。
参数:sos
An object of class SOS, whose settings, like formating information, can be utilitzed.
类的SOS,其设置的对象,如格式化信息,可以utilitzed。
Details
详细信息----------Details----------
The methods are automatically called from the given SOS's list of conversion functions. This is either default or can be set manually on creation.
从给定的SOS转换函数的列表的方法被自动调用。这可能是默认的,也可以手动设置创建。
If you want to provide you own conversion functions, follow the example below. Always include the common parameters x and sos.
如果您想为您提供自己的转换功能,请按照下面的例子。请务必包括常见的参数x和sos。
There are functions to access the converters of a SOS (sosDataFieldConverters-methods) and to combine default and your own converters (SosDataFieldConvertingFunctions).
有函数来访问的SOS转换器(sosDataFieldConverters-methods)和,结合默认情况下,你自己的转换器(SosDataFieldConvertingFunctions)。
值----------Value----------
An object of the respective class converted from the parameter x.
从参数x转换的各自的类别中的一个目的。
(作者)----------Author(s)----------
Daniel Nuest <a href="mailto:daniel.nuest@uni-muenster.de">daniel.nuest@uni-muenster.de</a>
参见----------See Also----------
sosDataFieldConverters-methods, SosDataFieldConvertingFunctions
sosDataFieldConverters-methods,SosDataFieldConvertingFunctions
实例----------Examples----------
## Not run: [#不运行:]
sos <- SOS(url = SosExampleServices()[[2]])
one <- sosConvertDouble("1", sos)
class(one)
# add conversion rules, also possible to override default ones[添加转换规则,也可以覆盖默认的]
myConverters <- SosDataFieldConvertingFunctions(
"C" = sosConvertDouble,
"S/m" = sosConvertDouble)
sos <- SOS(url = SosExampleServices()[[2]], dataFieldConverters = myConverters)
# show converters[显示转换器]
sosDataFieldConverters(sos)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|