search for: strtoi

Displaying 20 results from an estimated 24 matches for "strtoi".

Did you mean: strtol
2019 Jan 11
2
strtoi output of empty string inconsistent across platforms
Identified as root cause of a bug in data.table: https://github.com/Rdatatable/data.table/issues/3267 On my machine, strtoi("", base = 2L) produces NA_integer_ (which seems consistent with ?strtoi: "Values which cannot be interpreted as integers or would overflow are returned as NA_integer_"). But on all the other machines I've seen, 0L is returned. This seems to be consistent with the output of...
2019 Jan 11
2
strtoi output of empty string inconsistent across platforms
...11 Jan 2019 09:44:14 +0100 writes: >>>>> Michael Chirico >>>>> on Fri, 11 Jan 2019 14:36:17 +0800 writes: >> Identified as root cause of a bug in data.table: >> https://github.com/Rdatatable/data.table/issues/3267 >> On my machine, strtoi("", base = 2L) produces NA_integer_ >> (which seems consistent with ?strtoi: "Values which >> cannot be interpreted as integers or would overflow are >> returned as NA_integer_"). > indeed consistent with R's documentation on strtoi()....
2017 Aug 31
2
Converting character to numeric using the package "XLConnect"
Thanks very much for your answer. I?m trying the function ?strtoi? but it fails to convert character to numeric after the command "set[index] <- strtoi(set[index])". > strtoi(set[index]) ## This works: all values are numeric !!! [1] 1 2 3 4 2 8 9 7 > set[index] <- strtoi(set[index]) > print(set[10,1]) ## Problem: must be numeric...
2019 Jan 11
0
strtoi output of empty string inconsistent across platforms
>>>>> Michael Chirico >>>>> on Fri, 11 Jan 2019 14:36:17 +0800 writes: > Identified as root cause of a bug in data.table: > https://github.com/Rdatatable/data.table/issues/3267 > On my machine, strtoi("", base = 2L) produces NA_integer_ > (which seems consistent with ?strtoi: "Values which cannot > be interpreted as integers or would overflow are returned > as NA_integer_"). indeed consistent with R's documentation on strtoi(). What machine would tha...
2019 Jan 12
0
strtoi output of empty string inconsistent across platforms
...gt; > >>>>> Michael Chirico > >>>>> on Fri, 11 Jan 2019 14:36:17 +0800 writes: > > >> Identified as root cause of a bug in data.table: > >> https://github.com/Rdatatable/data.table/issues/3267 > > >> On my machine, strtoi("", base = 2L) produces NA_integer_ > >> (which seems consistent with ?strtoi: "Values which > >> cannot be interpreted as integers or would overflow are > >> returned as NA_integer_"). > > > indeed consistent with R's docu...
2016 Feb 09
0
Minor portability patch
Hi, I've used the following patch First because re-defining strtoi is a problem, and it's named Strtoi elsewhere. Second because that is the sole use of strtoi that isn't Strtoi. Third, use = instead of ==, which is bash-specific. Additionally I must note there are a number of tests in configure.ac which do not append x to the beginning of the string. I h...
2017 Aug 30
0
Converting character to numeric using the package "XLConnect"
...to decimal? nrdf Setting Value 1 Parameters a 2 Parameters b 3 Parameters c 4 Parameters d 5 Parameters e 6 Parameters 2 7 Parameters 8 8 Parameters 9 9 Parameters 7 10 1 a 11 2 b 12 3 c 13 4 d strtoi(nrdf$Value,16) [1] 10 11 12 13 14 2 8 9 7 10 11 12 13 Jim On Thu, Aug 31, 2017 at 6:30 AM, Nelly Reduan <nell.redu at hotmail.fr> wrote: > The Excel file can be found from this link: https://1drv.ms/x/s!Apkg2VlgfYyDgQ_mcJ8F4CaXV_Nh
2011 Nov 17
1
how to read a free text file into individual variables
...info <- readLines(configfile,ok=TRUE,n=-1) methodnum <- unlist(strsplit(configinfo[2],":"))[2] methodname <- unlist(strsplit(configinfo[3],":")) time <- strtrim((unlist(strsplit(configinfo[4],":"))[2]),3) and time is a string "3 " and strtoi(time) failed and is "[1] NA" when time <- strtoi(strtrim((unlist(strsplit(configinfo[4],":"))[2]),1)) time is a integer "6" actually this parameter could be a 1 to 4 digital number from 1 to 9999 How could I can read this kind of variables into my config R file...
2017 Aug 30
3
Converting character to numeric using the package "XLConnect"
The Excel file can be found from this link: https://1drv.ms/x/s!Apkg2VlgfYyDgQ_mcJ8F4CaXV_Nh [https://r1.res.office365.com/owa/prem/images/dc-xlsx_40.png]<https://1drv.ms/x/s!Apkg2VlgfYyDgQ_mcJ8F4CaXV_Nh> File.xlsx<https://1drv.ms/x/s!Apkg2VlgfYyDgQ_mcJ8F4CaXV_Nh> Partag? via OneDrive Thanks very much for your help. Nell ________________________________ De : David Winsemius
2010 Oct 07
2
Truncating leading zeros in strings
I am new to R. I thing this will be simple, but I don't yet know my way around. I am generating character strings from the system clock that represent integers, and I want to convert them to integer values. Strtoi works well, except when there are leading zeros on the string. Could anyone suggest a way to remove those leading zeros? Thanks Paul -- E. Paul Wileyto, Ph.D. Assistant Professor of Biostatistics Tobacco Use Research Center School of Medicine, U. of Pennsylvania 3535 Market Street, Suit...
2011 Nov 17
2
how to read a freetext line ?
hi everyone . Here I have a text where there are some integer and string variables.But I can not read them by readLines and scan the text is : weight ;30;130 food:2;1;12 color:white;black the first column is the names of the variables and others are the value of them. the column in different line are different. Can anyone help me ? -- TANG Jie Email: totangjie@gmail.com Tel: 0086-2154896104
2016 Apr 16
2
Mean of hexadecimal numbers
...rt Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Apr 16, 2016 at 8:20 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > ?strtoi > > You'll have to remove the "#" first, e.g. via substring() > > -- Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his &qu...
2016 Apr 16
0
Mean of hexadecimal numbers
?strtoi You'll have to remove the "#" first, e.g. via substring() -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Apr...
2012 May 08
1
Fast reading of hex data?
...the integer representations of each byte into the appropriate integer by tmp <- tmp - 48 - 7*(tmp>64) Collating blocksize values together by tmp<- matrix(tmp, ncol = blocksize, byrow = T) %*% 16^(blocksize: 1 - 1) Now, my question is, is there a better way? My attempts with rawToChar and strtoi seems to take drastically longer for reasonably lengthy bytepos, presumeably because of string manipulations/storage, but possibly I am doing it wrong somehow. If there is no better way in R, would there be much value in implementing this in C, for example, or would the computational improvement be...
2016 Apr 16
0
Mean of hexadecimal numbers
...le with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Apr 16, 2016 at 8:20 AM, Bert Gunter <bgunter.4567 at gmail.com> > wrote: > > ?strtoi > > > > You'll have to remove the "#" first, e.g. via substring() > > > > -- Bert > > > > > > Bert Gunter > > > > "The trouble with having an open mind is that people keep coming along > > and sticking things into it.&qu...
2016 Apr 16
5
Mean of hexadecimal numbers
Hi, How would you calculate the "mean colour" of several colours, for example c("#FF7C00","#00BF40","#FFFF00")? Yours, Atte Tenkanen
2010 Sep 05
4
converting string vector to integer/numeric vector
Hi, Is it possible to convert a string vector to integer or numeric vector? In my situation I receive data in a string vector and have to convert it based on a given type. -- Rajesh.J [[alternative HTML version deleted]]
2013 Dec 02
2
plus/minus +/- in factor; not plotmath not expression
I want to put the "plus or minus" symbol into a character variable, so that this can be turned into a factor and be displayed in the "strip" of a faceted ggplot2 plot. A very nice solution, thanks to Professor Ripley's post of Nov 16, 2008; 3:13pm, visible at http://r.789695.n4.nabble.com/Symbols-to-use-in-text-td874239.html and subsequently
2010 Apr 22
2
R2.11.0 - rasterImage() and barplot fill-patterns
...ldots, \dots, \ge and \le. > > o utf8ToInt() and intToUtf8() now map NA inputs to NA outputs. > > o file() has a new argument 'raw' which may help if it is used > with something other than a regular file, e.g. a character device. > > o New function strtoi(), a wrapper for the C function strtol. > > o as.octmode() and as.hexmode() now allow inputs of length other > than one. > > The format() and print() methods for "octmode" now preserve > names and dimensions (as those for "hexmode" did...
2010 Apr 22
0
R 2.11.0 is released
...ed as \alpha ...), \ldots, \dots, \ge and \le. o utf8ToInt() and intToUtf8() now map NA inputs to NA outputs. o file() has a new argument 'raw' which may help if it is used with something other than a regular file, e.g. a character device. o New function strtoi(), a wrapper for the C function strtol. o as.octmode() and as.hexmode() now allow inputs of length other than one. The format() and print() methods for "octmode" now preserve names and dimensions (as those for "hexmode" did). The format()...