简体   繁体   English

使用R读取LabVIEW TDMS文件

[英]Reading LabVIEW TDMS files with R

As part of a transition from MATLAB to R, I am trying to figure out how to read TDMS files created with National Instruments LabVIEW using R. TDMS is a fairly complex binary file format ( http://www.ni.com/white-paper/5696/en/ ). 作为从MATLAB到R的过渡的一部分,我试图弄清楚如何使用R读取使用National Instruments LabVIEW创建的TDMS文件。TDMS是一种相当复杂的二进制文件格式( http://www.ni.com/white-纸/ 5696 / en / )。

Add-ons exist for excel and open-office ( http://www.ni.com/white-paper/3727/en/ ), and I could make something in LabVIEW to make the conversion, but I am looking for a solution that would let me read the TDMS files directly into R . 存在用于excel和开放办公室的附加组件( http://www.ni.com/white-paper/3727/en/ ),我可以在LabVIEW中进行一些转换,但是我正在寻找解决方案那会让我直接将TDMS文件读入R。 This would allow us to test out the use of R for certain data processing requirements without changing what we do earlier in the data acquisition process. 这将使我们能够测试R在某些数据处理需求中的使用,而无需更改我们在数据采集过程中的早期操作。 Having a simple process would also reduce the barriers to others trying out R for this purpose. 拥有简单的流程也将减少其他人为此目的尝试R的障碍。

Does anyone have any experience with reading TDMS files directly into R, that they could share? 有没有人有过将TDMS文件直接读取到R中可以共享的经验?

这远不支持所有TDMS规范,但是我在这里R将https://github.com/msuefishlab/tdmsreader引入了一个python npTDMS包的端口,并已在此处的闪亮应用程序环境中进行了测试。

You don't say if you need to automate the reading of these files using R, or just convert the data manually. 您无需说是否需要使用R自动读取这些文件,或者只是手动转换数据。 I'm assuming you or your colleagues don't have any access to LabVIEW yourselves otherwise you could just create a LabVIEW tool to do the conversion (and build it as a standalone application or DLL, if you have the professional development system or app builder - you could run the built app from your R code by passing parameters on a command line ). 我假设您或您的同事自己无权访问LabVIEW,否则您可以创建一个LabVIEW工具进行转换(如果您拥有专业的开发系统或应用程序构建器,则可以将其构建为独立的应用程序或DLL。 -您可以通过在命令行上传递参数,从R代码中运行内置的应用。

The document on your first link refers to (a) add-ins for OpenOffice Calc and for Excel, which should work for a manual conversion and which you might be able to automate using those programs' respective macro languages, and (b) a C DLL for reading TDMS - would it be possible for you to use one of those? 一个链接上的文档涉及(a)用于OpenOffice Calc和Excel的加载项,这些加载项应可进行手动转换,并且您可以使用这些程序的相应宏语言自动执行该加载项,以及(b)C用于读取TDMS的DLL-是否可以使用其中之一?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM