Hi,
I am responsible for a statistical analysis of a certain data for a research project. The program I want to run is matlab. So I want to make every cell to numbers but some exceptions with missing data.
Assume I have the following form of data. (I made up this.)
ID DATE X1 X2 X3 X4 X5 X6
1 18SEP2008 5 3 4 -1 -2 A
2 19SEP2008 9999 4 2 9 3 C
3 16SEP2008 2 0 9999 -8 -7 B
....
For X1 throught X3, 9999 means a missing data.
For X4 and X5, any negative number is a missing data.
I want to convert each date to the number representing days since Aug 10, 2008, for example.
For X1 through X6, all the missing data would be converted to NaN, or anything that can be recognized as missing by matlab.
For X6, A would be converted to 0 and B to 1, and C to 2. (the numbers don't matter as long as they are numbers distinguishing among different states A, B and so on.)
In the end, I want the data to be reorganized as:
ID DATE X1 X2 X3 X4 X5 X6
1 39 5 3 4 NaN NaN 0
2 40 NaN 4 2 9 3 2
3 37 2 0 NaN NaN NaN 1
....
(I may convert some data in matlab if it is more appropriate.)
I am new to Access and so please understand if my question is too basic.
If you can help me in whatever ways, please do that for me.
Thank you,
Joon
I am responsible for a statistical analysis of a certain data for a research project. The program I want to run is matlab. So I want to make every cell to numbers but some exceptions with missing data.
Assume I have the following form of data. (I made up this.)
ID DATE X1 X2 X3 X4 X5 X6
1 18SEP2008 5 3 4 -1 -2 A
2 19SEP2008 9999 4 2 9 3 C
3 16SEP2008 2 0 9999 -8 -7 B
....
For X1 throught X3, 9999 means a missing data.
For X4 and X5, any negative number is a missing data.
I want to convert each date to the number representing days since Aug 10, 2008, for example.
For X1 through X6, all the missing data would be converted to NaN, or anything that can be recognized as missing by matlab.
For X6, A would be converted to 0 and B to 1, and C to 2. (the numbers don't matter as long as they are numbers distinguishing among different states A, B and so on.)
In the end, I want the data to be reorganized as:
ID DATE X1 X2 X3 X4 X5 X6
1 39 5 3 4 NaN NaN 0
2 40 NaN 4 2 9 3 2
3 37 2 0 NaN NaN NaN 1
....
(I may convert some data in matlab if it is more appropriate.)
I am new to Access and so please understand if my question is too basic.
If you can help me in whatever ways, please do that for me.
Thank you,
Joon
Comment