問題タブ [redcap]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
130 参照

r - How to read from REDCap forms with data validation into R (REDCapR::readcap_read)

I've been using the REDCapR package to read in data from my survey form. I was reading in the data with no issue using redcap_read until I realized I needed to add a field restriction to one question on my survey. Initially it was a short answer field asking users how many of something they had, and people were doing expectedly annoying things like spelling out numbers or entering "a few" instead of a number. But all of that data read in fine. I changed the field to be a short answer field (same type as before) that requires the response to be an integer and now the data won't read into R using redcap_read.

When I run:

redcap_read(redcap_uri=uri, token=api_token)$data

I get the error message that:

Column [name of my column] can't be converted from numeric to character

I also noticed when I looked at the data that that it read in the 1st and 6th records of that column (both zeros) just fine (out of 800+ records), but everything else is NA. Is there an inherent problem with trying to read in data from a text field restricted to an integer or is there another way to do this?

Edit: it also reads the dates fine, which are text fields with a date field restriction. This seems to be very specific to reading in the validated numbers from the text field.

I also tried redcapAPI::exportRecords and it will continue to read in the rest of the dataset, but reads in NA for all values in the column with the test restriction.

0 投票する
0 に答える
34 参照

php - PHP で REDCap 配列からデコード JSON を抽出する方法

REDCap からの JSON エクスポートがあり、ネストされた ARRAY として開始されました。json_decode を使用していますが、結果を出力するとエラーが発生します。

配列は次のとおりです。

私のコードは次のとおりです。

「echo」行でエラーが発生します。私は何を間違っていますか?! ありがとうございました