search for: drop0trailing

Displaying 14 results from an estimated 14 matches for "drop0trailing".

2019 May 30
1
Possible bug in formatC
...improper documentation. The documentation for formatC() implies that the difference between the options format="f" and format="g" is that with "g", scientific format is sometimes used. There is another difference between them that is not mentioned in the documentation. drop0trailing=FALSE is ignored when format is set to "g" unless flag contains "#" (this is the documented behavior for format="fg"). For instance, the first line below return " 2.5", whereas the second returns the expected "2.50". formatC(2.50, format="g&q...
2011 May 08
2
Pretty printing numbers
Friends I am trying to format a number to a string so 2189.745 goes to "2,189.35" and 309283.929 goes to "309,283.93" I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f") but it does not get the number of decimals correct. Specifying digits does not work as that is significant digits. I could use a switch statement switching on the size of the number to be formated to set the digits parameter but that is complex and leaves me insecure...
2010 Jul 01
2
Export data frame of high dimension to txt
...uot; correctly 367 columns, so it reads the first 145 columns and it folds down the rest of them and consequently it folds down the respective data. f=format.data.frame(rev,trim=F,digits=NULL,nsmall=3, ## rev is the data frame of 37 rows and 367 columns ## justify="centre",zero.print=F,drop0trailing=T);f write.table(f,file="C:/Program Files/R/R-2.11.0/genes as rows.txt", row.names=T,sep="\t",quote=F,dec=".",col.names=NA,append=T) Is there something wrong? Thank you in advance, Loukia Maria S. ________________________________________________________...
2013 Mar 13
1
expression exponent labeling
...ly scaled axis: hist(log10(d), breaks=100, xaxt="n") abline(v= log10(1:10*10^rep(-9:3, each=10)), col="darkgrey" ); box() hist(log10(d), breaks=100, col="forestgreen", add=T) axis(1, log10(1:10*10^rep(-9:3, each=10)), labels=F) axis(1, -2:2, format(10^(-2:2), scient=3, drop0trailing=T) ) # the labels with lower values should be in the form of 10^x: axis(1, -8:-3, expression( 10^(-8:-3)) )# doesn't work, because expression returns only one output for(i in -8:-3) axis(1, i, expression(10^i)? ) # writes i at all locations expression does exactly what it should, but I want so...
2011 Jan 26
2
write.table -- maintain decimal places
Hello, All, How can I maintain the decimal places when using write.table()? Jim e.g. df: EFFECT2 PVALUE 1 0.023 0.88080 2 -0.260 0.08641 3 -0.114 0.45200 write.table(df,file='df.txt',quote=F,sep='\t',row.names=F) df.txt: EFFECT2 PVALUE 0.023 0.8808 -0.26 0.08641 -0.114 0.452 [[alternative HTML version deleted]]
2008 Dec 22
0
R 2.8.1 is released
...quot; method for lines() now works if 'subset' is supplied and no 'data' argument (as that for points() did). o Sweave() now takes the defaults for the options 'pdf.version' and 'pdf.encoding' of its RweaveLatex driver from pdf.options(). o prettyNum(x, drop0trailing=TRUE) treated "1.1e20" as "1.1e2" and hence str() did as well, in 2.8.0 only. o dchisq(x, df, ncp) no longer hangs for large x and ncp > 0, and is more accurate in some cases (PR#13309). o installed.packages(lib.loc = D, priority="NA") now also works w...
2008 Dec 22
0
R 2.8.1 is released
...quot; method for lines() now works if 'subset' is supplied and no 'data' argument (as that for points() did). o Sweave() now takes the defaults for the options 'pdf.version' and 'pdf.encoding' of its RweaveLatex driver from pdf.options(). o prettyNum(x, drop0trailing=TRUE) treated "1.1e20" as "1.1e2" and hence str() did as well, in 2.8.0 only. o dchisq(x, df, ncp) no longer hangs for large x and ncp > 0, and is more accurate in some cases (PR#13309). o installed.packages(lib.loc = D, priority="NA") now also works w...
2008 Oct 20
2
R 2.8.0 is released
...tends 'value' if it a list and too short, and 'x' is an array. This allows constructions such as dimnames(x)[[1]] <- 1:3 to work whether or not 'x' already has dimnames. o format(), formatC() and prettyNum() gain a new argument 'drop0trailing' which can be used to suppress trailing "0"s. o format() now works for environments; also print(env) and str(env) share the same code for environments. o It is now possible to create and open a text-mode gzfile() connection by explicitly using e.g. open=&...
2008 Oct 20
2
R 2.8.0 is released
...tends 'value' if it a list and too short, and 'x' is an array. This allows constructions such as dimnames(x)[[1]] <- 1:3 to work whether or not 'x' already has dimnames. o format(), formatC() and prettyNum() gain a new argument 'drop0trailing' which can be used to suppress trailing "0"s. o format() now works for environments; also print(env) and str(env) share the same code for environments. o It is now possible to create and open a text-mode gzfile() connection by explicitly using e.g. open=&...
2009 Oct 26
0
R 2.9.0 is released
...console) did not handle special built-in functions. Reported by Romain Francois. o order() was missing a PROTECT() call and so could segfault when called on character data under certain (rare) circumstances involving marked non-native encodings. o prettyNum(z, drop0trailing=TRUE) did not work correctly when z was a complex vector. Consequently, str(z, ...) also did not. (PR#13985) o 'make distclean' removed too many files in etc/ if builddir = srcdir. o R CMD replaced TEXINPUTS rather than appending to it (as do...
2009 Oct 26
0
R 2.9.0 is released
...console) did not handle special built-in functions. Reported by Romain Francois. o order() was missing a PROTECT() call and so could segfault when called on character data under certain (rare) circumstances involving marked non-native encodings. o prettyNum(z, drop0trailing=TRUE) did not work correctly when z was a complex vector. Consequently, str(z, ...) also did not. (PR#13985) o 'make distclean' removed too many files in etc/ if builddir = srcdir. o R CMD replaced TEXINPUTS rather than appending to it (as do...
2009 Oct 26
0
R 2.10.0 is released
...console) did not handle special built-in functions. Reported by Romain Francois. o order() was missing a PROTECT() call and so could segfault when called on character data under certain (rare) circumstances involving marked non-native encodings. o prettyNum(z, drop0trailing=TRUE) did not work correctly when z was a complex vector. Consequently, str(z, ...) also did not. (PR#13985) o 'make distclean' removed too many files in etc/ if builddir = srcdir. o R CMD replaced TEXINPUTS rather than appending to it (as do...
2009 Oct 26
0
R 2.10.0 is released
...console) did not handle special built-in functions. Reported by Romain Francois. o order() was missing a PROTECT() call and so could segfault when called on character data under certain (rare) circumstances involving marked non-native encodings. o prettyNum(z, drop0trailing=TRUE) did not work correctly when z was a complex vector. Consequently, str(z, ...) also did not. (PR#13985) o 'make distclean' removed too many files in etc/ if builddir = srcdir. o R CMD replaced TEXINPUTS rather than appending to it (as do...
2010 Aug 24
0
mlm for within subject design
......) { x } # do nothing for non-numeric lucid.numeric <- function(x, dig=4, ...) { # Use 4 significant digits, drop trailing zero, align decimals if(class(x)=="numeric" | class(x)=="integer") format(format(signif(zapsmall(x), dig), scientific=FALSE, drop0trailing=TRUE)) else x } lucid.data.frame <- function(x, dig=4, quote=FALSE, ...){ x[] <- lapply(x, lucid, dig) print(x, quote=quote) invisible(x) } Kevin Wright On Sun, Aug 22, 2010 at 2:43 AM, David Hajage wrote: > 2010/8/21 Donald Winston > >> I know how to program in a d...