similar to: RW 0.64.2 substring() string truncation?

Displaying 20 results from an estimated 4000 matches similar to: "RW 0.64.2 substring() string truncation?"

1999 Oct 30
1
read.table problem on Linux/Alpha (seg faults caused by isspace(R_EOF)) (PR#303)
Full_Name: Naoki Takebayashi Version: 0.65.1 OS: Linux/Alpha Submission from: (NULL) (129.79.224.171) When I was reading a file with read.table("junk.data"), it seg-faulted. I found out that it seg-faulted when the last line of data file didn't have the newline char. For example, file like this: 23 3 31 2 24 1<EOF> Here is a fix. --- R-0.65.1/src/main/scan.c.orig
2015 Sep 21
5
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
Hi, Note that one significant change to read.dcf() that happened since R 3.0.2 is the addition of support for arbitrary long lines (commit 63281), which never worked: dcf <- paste(c("aa: ", rep(letters, length.out=10000)), collapse="") writeLines(dcf, "test.dcf") nchar(read.dcf("test.dcf")) # aa # [1,] 8186 The culprit being line
2009 Mar 18
1
sprintf("%d", integer(0)) aborts
In R's sprintf() if any of the arguments has length 0 the function aborts. E.g., > sprintf("%d", integer(0)) Error in sprintf("%d", integer(0)) : zero-length argument > sprintf(character(), integer(0)) Error in sprintf(character(), integer(0)) : 'fmt' is not a non-empty character vector This comes up in code like x[nchar(x)==0] <-
2020 Jun 26
2
Error in substring: invalid multibyte string
Hi all, I'm getting the following error from substring: > substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) Error in substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) : invalid multibyte string at '<e4>gel-A<6b>iyoshi' Is that normal / intended? I've tried setting the Encoding/locale to Latin-1/UTF-8 but that does not help. nchar
1999 Oct 13
3
main/character.c (et.al): dangerous AllocBuffer()
I was hit by ugly crashes of R, when I tried to read big data sets ("volcano"). So I looked into the code and found the following in character.c (triggered by substr()): I assume that the helper function AllocBuffer() shall facilitate an economic memory management. But the use of realloc() in the else-branch does not conform to ANSI and may hit you with certain compilers. When called
1999 Oct 13
3
main/character.c (et.al): dangerous AllocBuffer()
I was hit by ugly crashes of R, when I tried to read big data sets ("volcano"). So I looked into the code and found the following in character.c (triggered by substr()): I assume that the helper function AllocBuffer() shall facilitate an economic memory management. But the use of realloc() in the else-branch does not conform to ANSI and may hit you with certain compilers. When called
2013 Jan 30
2
substring from behind
Hello together, i have a question for "substring". I know i can filter a number like this one: bill$No<-substring(bill$Customer,2,4) in this case i get the 2nd, 3rd and 4th number of my Customer ID. But how can i do this, if i want the 2nd, 3rd and 4th number of a column. Like this one. I have: Mercedes_02352 Audi_03555 and now i want to filter this data.frame to 235 355 can you
2020 Jun 27
1
Error in substring: invalid multibyte string
Thanks for the quick response Ivan. readLines with encoding='latin1' works for me (on Ubuntu). However I was more concerned with the inconsistency in results between substr and regexpr. I was expecting that if one of them errors because of an unknown encoding then the other should as well. Even better, if regexpr works, why shouldn't substr work as well? Incidentally the analogous
2008 Oct 29
6
substring/strsplit question
Dear R People: Here is a toy example: > x <- c("2E","5W","12H") > substr(x,2,2) [1] "E" "W" "2" > Sometimes x has 3 elements, sometimes 2. I want to extract the last element, and then extract the other 1 or 2 elements. How can I do this, please? TIA, Sincerely, Erin -- Erin Hodgess Associate Professor Department of
2008 Dec 05
3
MIGRATE SHARES always fails
Hi, I have an Ubuntu 8.04 box running as Samba PDC (version 3.0.28a) with an LDAP backend, and I tried to migrate a share from a Win2003 server to the Samba box. However, running the "migrate shares" or the "migrate files" commands always results in errors: $ net rpc share MIGRATE SHARES data_share -S w2k3box -U <admin> --destination=localhost migrating:
2006 Aug 29
3
Substring and strsplit
Dear R People: I am trying to split a character vector into a set of individual letters: Ideal: x3 <- c("dog") "d" "o" "g" I tried the following: > strsplit(x3) Error in strsplit(x3) : argument "split" is missing, with no default > strsplit(x3,1) [[1]] [1] "dog" I know that this is incredibly simple, but what am I doing
2023 Jan 31
1
Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '<ff>' if an environment variable contains \xFF
> On 31 Jan 2023, at 12:51 , Tomas Kalibera <tomas.kalibera at gmail.com> wrote: > > > On 1/31/23 11:50, Martin Maechler wrote: <snippage> >> hmm.., that's a pity; I had hoped it was a pragmatic and valid strategy, >> but of course you are right that type stability is really a >> valid goal.... >> >> In general, what about behaving close
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml: open Printf open Llvm let build_fib m = let fibf = define_function "fib" (function_type i32_type [| i32_type |]) m in let bb = builder_at_end (entry_block fibf) in let one = const_int i32_type 1 and two = const_int i32_type 2 in let argx = param fibf 0 in set_value_name "AnArg" argx; let
2005 Jul 20
1
(PR#8017) build of REventLoop package crashes with 2.1 due
In what way is this a bug in R? It looks like a bug in the package, and as Defn.h is not part of R's API any packge using it is `at risk' (and cannot be installed in a binary-only installation, or even an installed version of R). In particular, Defn,.h depends on config.h, and it seems you installed a binary version of R and used separate sources. I would suggest building R from
2011 Jul 07
1
Substring a column vector
How to substring the following vector (in data frame b) >b a 11 12 1234 1245 124567 126786 145769 such that: a1??? a2 1???? 1 1???? 2 12??? 23 12??? 34 124?? 567 126???787 145???769 ? I tried logical commands with substr() did not work out.
2004 Oct 27
1
regexp,grep: capturing more than one substring
Hello, I would like to have a function that retrieve matching strings in the same way as with java.util.regex (java 1.4.2). Example: f('^.*(xx?)\\.([0-9]*)$','abcxx.785') => c('xx','785') First of all: Is it possible to achiev this with grep(... perl=TRUE,value=TRUE )? As I would call this function very often with large data, I'm reluctant to use Sjava
2008 Jul 01
1
Autoconf / Windows package building problem for device package
Dear list, Tadashi Kadowaki has developed a pdf device package that allows to add hyperlinks and popups to (currently) text, mtext and rect calls. The package passes R CMD check (minor warnings) and compiles on MacOS X and GNU/Linux, but we do not succeed in building the package for Windows. The current version of the package can be checked out as svn checkout
2015 Sep 21
2
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
Here's an update: I checked the ChangeLog for R, and it seems like readDCF was changed in 3.0.2. I went on a whim and copied src/main/dcf.c from R 2.15.3 over to 3.2.2, and R compiled fine and install.packages now work for me. This is probably not ideal, but it at least makes R usable on AIX for me. Would definitely like to help figure out what's wrong with the new dcf.c on AIX.
2006 Jul 07
2
ASTCC: inuse flag still hangs!
I have patched astcc.agi with the HUP patch, but it still hangs from time to time. Asterisk SVN-branch-1.2-r25165M built by root @ vpbx on a x86_64 running Linux on 2006-05-07 00:31:09 UTC bye Ronald
2016 Aug 03
3
Problem with configuring Xapian
Hi all, > It would be better to use the XO_LIB_XAPIAN macro provided by > xapian-core instead of writing your own code to probe for > xapian-config. > > Everything from line 3 to line 18 of your current configure.ac could be > replaced with just: > > XO_LIB_XAPIAN > > If you've installed xapian-core then the macro should just be > found automatically. I