search for: sprintfs

Displaying 20 results from an estimated 2971 matches for "sprintfs".

Did you mean: sprintf
2009 Mar 20
1
sprintf causes a segfault (PR#13613)
Full_Name: Wacek Kusnierczyk Version: 2.8.0 and 2.10.0 r48163 OS: Ubuntu 8.04 Linux 32bit Submission from: (NULL) (129.241.198.172) the following code illustrates a problem with sprintf which consistently causes a segfault when applied to certain type of arguments. it also shows inconsistent consequences of the segfault: (e = tryCatch(stop(), error=identity)) # e is an error object
2009 Apr 21
8
incorrect output and segfaults from sprintf with %*d (PR#13667)
Full_Name: Wacek Kusnierczyk Version: 2.10.0 r48365 OS: Ubuntu 8.04 Linux 32bit Submission from: (NULL) (129.241.110.141) sprintf has a documented limit on strings included in the output using the format '%s'. It appears that there is a limit on the length of strings included with, e.g., the format '%d' beyond which surprising things happen (output modified for conciseness):
2020 Mar 11
1
[PATCH] builder: templates: add the AppStream repo
It is generally used together with BaseOS (which contains a restricted set of packages), so add it to the preconfigured repositories by default. --- builder/templates/make-template.ml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml index 8d26177bf..a4e2f37fb 100755 ---
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] <-
2023 Sep 02
1
Fails to install Rfast package
Hi, I was trying to install Rfast package in iMac (OS HIGH SIERRA) from source. However the installation fails with below message. Rfast is an essential package for various other packages in R Could you please help how to resolve this error? Thankss for your help > install.packages("/Volumes/WDStorage/NAS Download/Rfast_2.0.8.tar.gz", repos = NULL) * installing *source* package
2015 Nov 24
2
How to create a sprintf call in IR
Hi, I created a global char array, char buffer[1024]. I want to call a function to append the string information to the buffer repeatedly. For example, I need to implement the following code, where length, a, b, c, are global variables. int length = 0; length += sprintf(buffer+length, "str%d", a); length += sprintf(buffer+length, "str%c", b); length += sprintf(buffer+length,
2002 May 14
2
NaN/NA and sprintf double format
With a (late prerelease of) 1.5.0 on Windows, using sprintf on NaN yields garbage when the number of decimal is specified while it works fine for NA: > sprintf("%.2f", NA) [1] "0.00" > sprintf("%.2f", NaN) [1] "-1.#J" Not specifying the decimal precision lets both print garbage: > sprintf("%f", NaN) [1] "-1.#IND00" >
2012 Jul 30
2
sprintf doesn't care of escape characters
Hi. I am having trouble with something that should be simple. I am unable to get sprintf using escape sequences: > sprintf("a\nb") [1] "a\nb" > sprintf("a\"bc\"d") [1] "a\"bc\"d" But it seems to need them any way: > sprintf("a\"bc"d") Error: unexpected symbol in "sprintf("a\"bc"d"
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
Hello, llvmdev! I'm using LLVM on OpenBSD. This project proactively advocates usage of 'secure' C apis, especially related to memory bounds checking. Thus using functions like sprintf/strcpy/etc usually spits out a linker warning in base toolchain like this one: /home/proger/dev/llvm/Debug+Asserts/lib/libclangFrontend.a(DocumentXML.o) (.text+0xc65): In function
2003 Oct 31
1
strange sprintf() behaviour ?
This is quite strange behaviour - at least for R-novice as myself.... Consider this: > testf <- function() { x <-2; sprintf("%s %f", "x =", x); return(x) } > result <- testf() > testf <- function() { x <-2; sprintf("%s %f", "x =", x) } > result <- testf() > testf() [1] "x = 2.000000" Apparently adding return()
2006 May 03
3
sprintf question
How would one go about getting sprintf to use the values of a vector without having to specify each argument individually? > v <- c(1, 2, -1.197114, 0.1596687) > iv <- c(3, 1, 2, 4) > sprintf("%9.2f\t%d\t%d\t%8.3f", v[3], v[1], v[2], v[4]) [1] " -1.20\t1\t2\t 0.160" Essentially, desired effect would be something like: >
2013 Feb 15
2
sprintf in system command
hi all I am using r (2.15.2) in windows 7 32bit I want to execute an external program from r console. the program is a command line program which needs the following format to start C:/Users/.../dssp-2.0.4-win32.exe -i data_1.txt -o data_1.dssp I used the system command as: system ('C:/Users/.../dssp-2.0.4-win32.exe -i
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
I initially thought this is "documented behaviour". ?sprintf says: Numeric variables with __exactly integer__ values will be coerced to integer. (emphasis mine). Turns out this only works when the first value is numeric and not NA, as shown by the following example: > sprintf("%d", as.numeric(c(NA,1))) Error in sprintf("%d", as.numeric(c(NA, 1))) : invalid
2017 May 19
2
Inconsistency in handling of numeric input with %d by sprintf
Consider #as.numeric for emphasis sprintf('%d', as.numeric(1)) # [1] "1" vs. sprintf('%d', NA_real_) > Error in sprintf("%d", NA_real_) : invalid format '%d'; use format %f, %e, %g or %a for numeric object > I understand the error is correct, but if it works for other numeric input, why doesn't R just coerce NA_real_ to NA_integer_?
2008 Nov 14
0
(PR#13283) R crashes on sprintf with bad format specification
> From: r-devel-bounces at r-project.org=20 > [mailto:r-devel-bounces at r-project.org] On Behalf Of Prof Brian Ripley > Sent: Friday, November 14, 2008 2:25 AM > To: Duncan Murdoch > Cc: R-bugs at r-project.org; ocheyett at bonddesk.com;=20 > r-devel at stat.math.ethz.ch > Subject: Re: [Rd] (PR#13283) R crashes on sprintf with bad=20 > format specification >=20 > As
2008 Nov 14
0
(PR#13283) R crashes on sprintf with bad format
But %S is not valid in C99 or POSIX, even if it is a variant in some systems. I am working on a more careful checker right now, but there will be limits to what we can catch: this was already a pretty rare example. Brian On Fri, 14 Nov 2008, William Dunlap wrote: >> From: r-devel-bounces at r-project.org >> [mailto:r-devel-bounces at r-project.org] On Behalf Of Prof Brian Ripley
2020 Sep 20
2
sprintf, check number of parameters
Dear R developers, I am wondering if this should raise an error or a warning. > sprintf('%.f, %.f', 1, 2, 3) [1] "1, 2" I am aware that R has ?numbered? sprintf arguments (sprintf('%1$.f', ?), and in that case, omissing of specific arguments may be intended. But in the usual syntax, omission of an argument is probably a mistake. Thank you for your consideration.
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
https://github.com/Rdatatable/data.table/issues/2171 The fix was easy, it's just surprising to see the behavior change almost on a whim. Just wanted to point it out in case this is unknown behavior, but Evan seems to have found this as well. On Tue, May 23, 2017 at 12:00 PM, Michael Chirico <michaelchirico4 at gmail.com > wrote: > Astute observation. And of course we should be
2009 Dec 21
2
a little bug for the function 'sprintf' (PR#14161)
Dear R-ers, I am a gratuate student from South China University of Technology. I fond the function 'sprintf' in R2.10.1 have a little bug(?): When you type in the example codes: > sprintf("%s is %f feet tall\n", "Sven", 7.1) and R returns: [1] "Sven is 7.100000 feet tall\n" this is very different from the 'sprintf' function in C/C++, for in
2020 Nov 04
2
sprintf, check number of parameters
Dear Tomas,Thank you.Regarding the "unnumbered" arguments, i.e. sprintf('%f %f', 1, 2, 3). This was the case I wanted to report, here a warning can be very useful.Regarding the "numbered" arguments, that is, sprintf('%$1f %$3f', 1, 2, 3). Here, omission of an argument might be intended, for example, in an application with support for multiple languages.