Displaying 3 results from an estimated 3 matches for "styleact".
Did you mean:
skyleach
2017 Aug 30
2
Converting character to numeric using the package "XLConnect"
...(!is.na(setNum)), arr.ind=TRUE)
if(length(index)!=0){
set[index] <- unlist(lapply(set[index], function(x) as.numeric(as.character(x))))
}
## to check
set[10,1] ## Problem: must be numeric !!!!
writeWorksheetToFile("C:/Users/Downloads/Test.xlsx", data=set, sheet="settings", styleAction = XLC$"STYLE_ACTION.NONE")
How can I convert the numbers which are stored as characters to numeric?
Thanks so much for your time.
Have a nice day
Nell
2017 Aug 30
0
Converting character to numeric using the package "XLConnect"
...t; if(length(index)!=0){
> set[index] <- unlist(lapply(set[index], function(x) as.numeric(as.character(x))))
> }
> ## to check
> set[10,1] ## Problem: must be numeric !!!!
>
> writeWorksheetToFile("C:/Users/Downloads/Test.xlsx", data=set, sheet="settings", styleAction = XLC$"STYLE_ACTION.NONE")
>
> How can I convert the numbers which are stored as characters to numeric?
Have you tried using the formatting features of Excel to change the default "auto" sttings of black columns? You could select an entire column and set its format to...
2017 Aug 30
3
Converting character to numeric using the package "XLConnect"
...etNum)), arr.ind=TRUE)
> if(length(index)!=0){
> set[index] <- unlist(lapply(set[index], function(x) as.numeric(as.character(x))))
> }
> ## to check
[[elided Hotmail spam]]
>
> writeWorksheetToFile("C:/Users/Downloads/Test.xlsx", data=set, sheet="settings", styleAction = XLC$"STYLE_ACTION.NONE")
>
> How can I convert the numbers which are stored as characters to numeric?
Have you tried using the formatting features of Excel to change the default "auto" sttings of black columns? You could select an entire column and set its format to...