Skip to content

How to declare an array with columns storing different datatypes/precision

3 messages · Suresh_FSFM, Duncan Murdoch

#
Dear R- Experts,
Seek your help.

I want to creata data as follows.
Ref_array with 4 columns.
1st column should store data of precision: 8.4 (i.e. 8 digits before decimal
point and 4 digits after decimal points)
2nd column: should store data of type date "yyyy-mm-dd hh:mm:ss"
3rd column: only integer value. No decimal points
4th column: percentage values

Please help.

Thank you in advance.

Best Regards,
Suresh
#
On 2/4/2009 8:57 AM, Suresh_FSFM wrote:
In R, an array is all one data type, so you can't do that.  However, you 
can have a dataframe that comes close:  but there is no special type for 
  8.4 or percentage values, you'd need to use floating point (or fancy 
handling of integers) for those.

Duncan Murdoch
#
Ok. Array or Dataframe.. does not matter.. as long as I can extract the
required dataelement. :-)
Can you please send me pointer or reference to read about usage of "fancy
floating points" or "how to declare variables storing different datatypes"?

Thannk you.

Regards,
suresh
Duncan Murdoch-2 wrote: