similar to: vector sprintf argument

Displaying 20 results from an estimated 400 matches similar to: "vector sprintf argument"

2007 Dec 02
3
documenting yoru progress
Hello all: I have a function that writes a fairly elaborate report based on some survey data. For documentation and bookkeeping purposes, I'd like to write out in the report the function call that produced the report, or at least enough information to help me recreate the steps that led to that report. I've been generating all the reports with scripts, in order to be able to recreate
2007 Oct 15
1
avoiding a loop?
Hi All: I feel like there must be a slick R-native no-loop way to get the counts for the entries in a factor, but I'm unable to see how. Right now I'm doing this: hn.ent<-data.frame(rep(0,length(levels(hnf))), row.names=levels(hnf)) colnames(hn.ent)<-c("count") for (lev in levels(hnf)) { hn.ent[lev,"count"] <- sum(lev == hnf) } I'm sure there's a
2007 Sep 27
1
curvilinear grid
Hello all: A question from a new user. I have data on a geo-referenced curvilinear grid. This is a grid with 75 rows and 51 columns, is not aligned north-south, and the rows and columns are not straight. (And the coordinates are in meters.) I want to make image plots of this data, but where the grid is deformed according to the correct locations of the grid points, instead of coming out
2007 Oct 10
3
simulated data using empirical distribution
Hello all: I'm sure this is a trivial request, but I'm still a beginner at this, and haven't been able to find it. I need to create simulated data based on some empirical distributions of a single variable. I've found R functions to help me simulate data based on analytical distributions, or to make simulations based on correlation matrices, but nothing so simple as what I need.
2007 Nov 30
0
vector sprintf argument [SEC=UNCLASSIFIED]
Hi Tom, Try this: > G <- "Number: %s" > sprintf(G, toString(A)) [1] "Number: 3, 4, 5" Cheers Joe Joe Crombie Biosecurity and Information Sciences Bureau of Rural Science Canberra Australia p: +61 2 6272 5906 e: joe.crombie at brs.gov.au -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of
2007 Dec 20
1
data shape
Hello: I have been give a spreadsheet to work with formed as one big table. What it consists of is a 10-row-by-40-column table for each of about 70 different locations. In other words, the table row names are repeated 70 times, once for each of the locations (whose names also appear in the same column, where it's talking about the totals for that location), e.g.: A B C
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: >
2005 Sep 19
1
new samba install
we have been trying to move our samba box to a faster server, with better NICs, faster processor and more memory. both the old and new server are using samba 3.0.14A both on debian based distributions (old was sarge, new is breezy) here are the steps we followed: install samba from the apt archives. confermed that they were the same version. copied smb.conf from old server to new server. changed
2010 Mar 08
2
using sprintf to pass a variable to a RMySQL query
Hello, I am using RmySQL and would like to iterate through a few queries. I would like to use sprintf but I think I'm having problems mixing and matching the sprintf syntax and the SQL regex. I have checked my sqlcmd and it works when I wan to match %MG1% but how do I iterate for i 1-72? Escape characters,? thanks in advance i<-1 sqlcmd_ScaffLen<-sprintf('SELECT scaffold.length
2006 Jan 27
2
Ruby sprintf style question
In a rails app I have a sprintf("#0.2f",x.price) formatted value that may be nil. What is the preferred (short-elegant-terse) ruby way of testing for this and displaying a substitute text ("n/a") in place of the missing numeric value? Regards, Jim -- *** e-mail is not a secure channel *** mailto:byrnejb.<token>@harte-lyne.ca James B. Byrne
2007 Feb 14
0
sprintf error clustering with rattle
Hi, I'm an italian R (and data mining) beginner. I installed R, Rattle and rggobi with no trouble. But I'm not able to do clustering (both kmean and hierarchical). When I press F5 in Rattle Cluster tab nothing happens (and no log rows in the Log Tab). On the R console I get the following error (in italian): "Errore in sprintf(fmt, ...) : argomento di lunghezza zero" (it means
2007 Oct 02
2
using sprintf with dates
hello, Please help with using sprintf with character variables: The following does not produce what i intended foot=function(){ str1=format(Sys.Date,"%Y%m%d") sprintf("99%-4s%s","nm",str1) } I wanted to have "99nm 20071002" as the output.
2003 Jun 27
1
sprintf("%c",...)
How does one get the character that corresponds to a number? Also the inverse? The %c format code is not supported by the R sprintf function and I could not find another way to do it.
2007 Nov 26
1
[LLVMdev] How to declare and use sprintf
Hello, Jon > What is the correct way to do this? FunctionType constructor takes extra boolean for marking a varargs function. There is some trick: feed your bytecode to llvm2cpp tool and you'll get C++ source, which will construct the module you provided. From this source you can see, how different things can be created via LLVM API. -- With best regards, Anton Korobeynikov. Faculty
2001 May 18
0
patch to change sprintf to snprintf in inet_ntop.c for SunOS4
I found that inet_ntop.c was depending on the return value of sprintf to return an int, but on SunOS4 it returns a char *. Snprintf is preferred anyway, so here's a patch to change the calls to use snprintf. Applies cleanly to the current CVS, and it was the only patch I need to apply to get 2.9p1 to build on SunOS4.1.4. On the other hand, I can't see any where inet_ntop is called, and
2020 Mar 28
0
[klibc:master] Suppress format truncation warnings for sprintf() and vsprintf()
Commit-ID: d8e32d95a1bff2639f9ede9eae9b07b53f37bdac Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=d8e32d95a1bff2639f9ede9eae9b07b53f37bdac Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Sat, 28 Mar 2020 21:57:26 +0000 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:57:26 +0000 [klibc] Suppress format truncation
2002 May 16
0
Re: [R] NaN/NA and sprintf double format (PR#1561)
ripley@stats.ox.ac.uk wrote: > > On Tue, 14 May 2002, Dirk Eddelbuettel wrote: > > > 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" > > I get that on Linux too, but
2002 Nov 26
1
sprintf crash (PR#2327)
>2) Under MacOS 10.2.2. Given the following dataset: > > > summary(missing.data) > Hosp..No. Category Offset Side > r060093: 4 F Post op 0.5 year :62 Min. :-5.8333 L: 63 > r023250: 3 E Pre op 0.5 year :54 1st Qu.:-0.4167 R:141 > r026316: 3 H Post op 1.5 years :44 Median : 7.7083 > r032583: 3 G Post op 1 year
2005 Jan 24
1
sprintf("%s\n", a) segfaults R with big a (PR#7554)
Full_Name: Webb S. Version: 2.0.1 OS: Linux Debian Submission from: (NULL) (199.174.209.10) Transcript: > b = 'a small string' > sprintf('foo: %s\n', b) [1] "foo: a small string\n" > a = matrix (ncol=100, nrow=1000, data=c(1,2,3,4,5)) > a.serial = serialize(a, NULL, ascii=TRUE) > sprintf('foo: %s\n', a.serial) Segmentation fault
2006 Sep 25
2
sprintf behavior (PR#9250)
Full_Name: Michael Bauer Version: 2.3.1 OS: Mac OS X 10.4.7 Submission from: (NULL) (131.130.124.155) > sessionInfo() Version 2.3.1 (2006-06-01) powerpc-apple-darwin8.6.0 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" [6] "datasets" "base" > sprintf("\p")