similar to: nchar on data.frames

Displaying 20 results from an estimated 20000 matches similar to: "nchar on data.frames"

2005 Oct 25
1
performance of nchar
Hi, Is nchar function knowingly slow in R? I'm doing some string formatting that requires multiple call to nchar, and nchar seems to be very slow. Experiment 1, pass nchar inside sprintf, and it takes 0.7 seconds > system.time(for (i in 1:10000) + str = sprintf('0005%020d', nchar(op)) + )[3] [1] 0.7 Experiment 2, get the length of op separately using nchar, and then pass
2010 Jun 17
1
Multiple ecdf plots?
I have a csv file that has approximately 50k rows. In the first value of each row, a file name is listed, and there are 162 different file names. At the end of each row, there is a number value. What I would like to be able to do is for the 162 different files (or we could call them categories), is compute the ecdf for the values within that category. Then plot the ecdf for each file on the
2009 Aug 24
1
nchar on factors
In R 2.9.1 Windows: > nchar(factor(paste('sdf',1:10))) [1] 1 1 1 1 1 1 1 1 2 1 so it appears that nchar is counting the number of characters in the numeric representation, just like: > nchar(as.numeric(factor(paste('sdf',1:10)))) [1] 1 1 1 1 1 1 1 1 2 1 but ?nchar says explicitly: x: character vector, or a vector to be coerced to a character vector.
2015 Oct 05
2
Error generated by .Internal(nchar) disappears when debugging
Hi all, I have a puzzling problem related to nchar. In R 3.2.1, the internal nchar gained an extra argument (see https://stat.ethz.ch/pipermail/r-announce/2015/000586.html) I've been testing code using the package copula, and at home I'm still running R 3.2.0 (I know, I know...). When trying the following code, I got an error: > library(copula) > fgmCopula(0.8) Error in
2015 Oct 06
1
Error generated by .Internal(nchar) disappears when debugging
On 05/10/2015 8:25 PM, Matt Dowle wrote: > > On Mon, Oct 5, 2015 at 4:57 PM, Duncan Murdoch <murdoch.duncan at gmail.com > <mailto:murdoch.duncan at gmail.com>> wrote: > > On 05/10/2015 7:24 PM, Matt Dowle wrote: > > Joris Meys <jorismeys <at> gmail.com <http://gmail.com>> writes: > > > >> > >> Hi all,
2015 Oct 07
1
Error generated by .Internal(nchar) disappears when debugging
Malcolm, I tested the code on a clean R 3.2.0 session. Not even in RStudio, just to rule that out. > sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200) locale: [1] LC_COLLATE=English_United Kingdom.1252 [2] LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5]
2015 Oct 05
9
Error generated by .Internal(nchar) disappears when debugging
On 05/10/2015 7:24 PM, Matt Dowle wrote: > Joris Meys <jorismeys <at> gmail.com> writes: > >> >> Hi all, >> >> I have a puzzling problem related to nchar. In R 3.2.1, the internal > nchar >> gained an extra argument (see >> https://stat.ethz.ch/pipermail/r-announce/2015/000586.html) >> >> I've been testing code using the
2003 Aug 29
2
length() and nchar()
I would propose to add " See also: `nchar' for counting the number of character in character vectors. " to the helpfile of length(), because it is rather difficult to find nchar() if one has only search terms as "length", "len", "strlen" in mind. Sincerly Wolfram Fischer
2015 Apr 24
2
Development version of R: Improved nchar(), nzchar() but changed API
Those of you who track R development closely, will have noticed yesterday's commit of enhanced versions of nchar() and nzchar(). ------------------------------------------------------------------------ r68254 | maechler | 2015-04-23 18:06:37 +0200 (Thu, 23 Apr 2015) | 1 line Changed paths: M doc/NEWS.Rd M src/library/base/R/New-Internal.R M src/library/base/R/zzz.R M
2010 Jun 18
2
nchar( NA )
Hello, Is this expected ? > nchar( c( "", NA ) ) [1] 0 2 Should not the second one be NA ? Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/98Uf7u : Rcpp 0.8.1 |- http://bit.ly/c6YnCi : graph gallery collage `- http://bit.ly/bZ7ltC : inline 0.3.5
2015 Apr 27
1
Development version of R: Improved nchar(), nzchar() but changed API
Dear Martin, Does the work on nchar mean that bugs #16090 and #16091 will be resolved [1,2]? Thanks, Mark [1] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16090 [2] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16091 On Sat, Apr 25, 2015 at 11:06 PM, James Cloos <cloos at jhcloos.com> wrote: > >>>>> "GC" == G?bor Cs?rdi <csardi.gabor at
2012 Aug 27
4
?nchar ?strsplit
Hi, my data frame is x<-data.frame(ID=c("abc/def","abc/def/ghi","abc","mno/pqr/st/ab")) I want to split my column ID using "/" as the place to split. How can I do that without telling the code how many sub-columns. I could use nchar(gsub("[^/]","",x$ID)) to get how many "/" are in each row of the column, but could
2017 Mar 08
2
Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
Hello: A call to help(..., help_type='text') fails with "package='fda": > install.packages('fda') > help(package='fda', help_type='text') Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3) : incorrect values of 'indent' and 'width' I have this wrapped inside "try" in
2017 Mar 09
2
Error in formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
This error can arise when getOption("width") is too small. 80 seems to be the limit for me with R-3.3.2 on Windows. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 8, 2017 at 10:28 PM, Spencer Graves <spencer.graves at prodsyse.com> wrote: > Hello: > > > I tried "debug(help)" with the problem mentioned below. It stopped > with a call to
2012 Jun 24
1
uncoerce.... to get real number instead of integer?
Dear R community, > #I'm using scan() to extract a real number from a file with a complex structure: 156689504.378. > #My problem is that the number is coerced into an integer.  > #Do you have any ideas for me on how to "uncoerce"?  Here is my code and the output: > #I'm using R version 2.15.0 (2012-03-30) > > net3 <- patient.net3 <-
2010 Aug 10
3
sapply/lapply instead of loop
Using the input below, can I do something more elegant (and more efficient) than the loop also listed below to pad strings to a width of 5? The true matrix is about 300K rows and 31 columns. ####################### #INPUT ####################### > temp DX1 DX2 DX3 1 13761 8125 49178 2 63371 v75 22237 3 51745 77703 93500 4 64081 32826 v72 5 78477 43828 87645 >
2007 May 29
0
Correct usage of nchar(): precautionary change for R 2.6.0
Remember that nchar() returns by default the number of *bytes* and not the number of characters. I've recently spotted many cases in which nchar() has been used with substr() which works in characters; this can lead to incorrect results. (This seems the commonest use of nchar() in packages.) There were two reasons why nchar() was left defaulting to bytes when we allowed MBCSs in R:
2010 Aug 18
3
How to read ANOVA output
Hi folks, Where can I find document re "how to read anova output"? Google found many of them. But seemingly non of them can explain to me following output:- > tabA = c(5.67, 5.67, 5.55, 5.57) > tabB = c(5.75, 5.47, 5.43, 5.45) > tabC = c(4.74, 4.45, 4.65, 4.94) > tabs = data.frame(tabA, tabB, tabC) > tablets = stack(tabs) > anova(lm(values ~ ind, data =
1999 Nov 12
1
some related problems
I just tried to batch-start rgui.exe (not rterm.exe) in a way, that it read.table()s data from a file with changing filename. As I understand no command line parameters are available for that, so instead I tried to pass the filename to an approbriate .RProfile, which works roughly, BUT ## this is my %R_USER%\.RProfile im <- read.table("d:/temp/im/temp.csv", header=TRUE,
2015 Oct 07
0
Error generated by .Internal(nchar) disappears when debugging
What other packages do you have loaded? Perhaps a BioConductor one that loads S4Vectors that announces upon load: Creating a generic function for 'nchar' from package 'base' in package 'S4Vectors' Maybe a red herring... ~Malcolm > -----Original Message----- > From: R-devel [mailto:r-devel-bounces at r-project.org] On Behalf Of Duncan > Murdoch > Sent: