You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/machine-learning/r/r-libraries-and-data-types.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,27 +33,27 @@ This section lists the implicit conversions that are provided, and lists unsuppo
33
33
34
34
The following table shows the changes in data types and values when data from [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is used in an R script and then returned to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
35
35
36
-
| SQL type | R class | RESULT SET type | Comments |
|**bigint**|`numeric`|**float**| Executing an R script with `sp_execute_external_script` allows bigint data type as input data. However, because they are converted to R's numeric type, it suffers a precision loss with values that are very high or have decimal point values. R only support up to 53-bit integers and then it will start to have precision loss. |
39
-
|**binary(n)**<br /> n <= 8000 |`raw`|**varbinary(max)**| Only allowed as input parameter and output |
40
-
|**bit**|`logical`|**bit**||
39
+
|**binary(n)**<br /> n <= 8000 |`raw`|**varbinary(max)**| Only allowed as input parameter and output |
40
+
|**bit**|`logical`|**bit**||
41
41
|**char(n)**<br /> n <= 8000 |`character`|**varchar(max)**| The input data frame (input_data_1) are created without explicitly setting of *stringsAsFactors* parameter so the column type will depend on the *default.stringsAsFactors()* in R |
42
-
|**datetime**|`POSIXct`|**datetime**| Represented as GMT |
43
-
|**date**|`POSIXct`|**datetime**| Represented as GMT |
42
+
|**datetime**|`POSIXct`|**datetime**| Represented as GMT |
43
+
|**date**|`POSIXct`|**datetime**| Represented as GMT |
44
44
|**decimal(p,s)**|`numeric`|**float**| Executing an R script with `sp_execute_external_script` allows decimal data type as input data. However, because they are converted to R's numeric type, it suffers a precision loss with values that are very high or have decimal point values. `sp_execute_external_script` with an R script does not support the full range of the data type and would alter the last few decimal digits especially those with fraction. |
45
-
|**float**|`numeric`|**float**||
46
-
|**int**|`integer`|**int**||
45
+
|**float**|`numeric`|**float**||
46
+
|**int**|`integer`|**int**||
47
47
|**money**|`numeric`|**float**| Executing an R script with `sp_execute_external_script` allows money data type as input data. However, because they are converted to R's numeric type, it suffers a precision loss with values that are very high or have decimal point values. Sometimes cent values would be imprecise and a warning would be issued: *Warning: unable to precisely represent cents values*. |
48
48
|**numeric(p,s)**|`numeric`|**float**| Executing an R script with `sp_execute_external_script` allows numeric data type as input data. However, because they are converted to R's numeric type, it suffers a precision loss with values that are very high or have decimal point values. `sp_execute_external_script` with an R script does not support the full range of the data type and would alter the last few decimal digits especially those with fraction. |
49
-
|**real**|`numeric`|**float**||
50
-
|**smalldatetime**|`POSIXct`|**datetime**| Represented as GMT |
|**varbinary(n)**<br /> n <= 8000 |`raw`|**varbinary(max)**| Only allowed as input parameter and output |
56
+
|**varbinary(max)**|`raw`|**varbinary(max)**| Only allowed as input parameter and output |
57
57
|**varchar(n)**<br /> n <= 8000 |`character`|**varchar(max)**| The input data frame (input_data_1) are created without explicitly setting of *stringsAsFactors* parameter so the column type will depend on the *default.stringsAsFactors()* in R |
0 commit comments