similar to: round function seems to produce maximum 2 decimals

Displaying 20 results from an estimated 600 matches similar to: "round function seems to produce maximum 2 decimals"

2010 Jan 28
1
number of decimal
Hi everybody, I'm trying to set the number of decimals (i.e. the number of digits after the "."). I looked into options but I can only set the total number of digits, with options(digits=6). But since I have different variables with different order of magnitude, I would like that they're all displayed with the same number of decimals. I searched for it and found the format()
2013 Feb 27
3
positioning of R windows
I have 2 (related, I think) questions about positioning of windows within R. 1. I often work with a second monitor and sometimes like to arrange 1 or more plot windows on the second monitor, while keeping the console on the primary monitor (so I can see things better). I used to be able to do this (when using Windows XP), but it seems that now (using Windows 7) I can't even move the
2010 Nov 10
2
Decimal places in a function output
An embedded and charset-unspecified text was scrubbed... Name: n?o dispon?vel URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101110/9e098a24/attachment.pl>
2005 Jan 12
3
Win2K. Raw CUPS printing, driver download
Using Debian Sarge, samba, CUPS, and an HP G85 mutifunction with HPOJ to use the G85 USB connection, I've been able to get raw printing to work, and Point 'n' Print driver download to work, but not at the same time. The driver download was a chore, because of HP's proprietary install program. Had to install the driver locally to get the needed files and copy them manually to the
2019 Jun 20
2
base::format adds extraneous whitespace for some inputs
Dear R Core Team, First of all, thank you for your amazing work on developing and maintaining this wonderful language. I just stumbled upon the following behavior in R version 3.6.0: format(9.91, digits = 2, nsmall = 2) format(9.99, digits = 2, nsmall = 2) yield "9.91" and " 9.99" with an extraneous whitespace. My expected output for the second command is
2006 Feb 14
1
weird behavior of nsmall in format
>From the help page of format, nsmall should control the number of digits. > format(0.123456789, nsmall = 10) [1] "0.1234567890" > format(0.123456789, nsmall = 1) [1] "0.1234568" > format(0.123456789, nsmall = 2) [1] "0.1234568" > format(0.123456789, nsmall = 8) [1] "0.12345679" It adds zeros fine but for
2006 Jun 09
4
HTML nsmall vector format problem
Hello All I am having a bit of trouble formatting my HTML with the desired number of digits after the decimal place. Am I doing something wrong/misunderstanding or is it a bug? Looking at the example supplied with ?HTML.data.frame: HTML(iris[1:2,1:2],nsmall=c(3,1),file="") Gives html output that includes the lines: </tr> <tr><td
2009 Jun 11
2
How to force R to print 2 decimal places in column of a data.frame?
How to force R to print 2 decimal places in column of a data.frame? I tried to do so: x = inp(format(rounf(inp$Tamanho, 2), nsmall = 2),) where "INP" is data.frame and "Size" is the name of column. But has error: Error in eval.with.vis(expr, envir, enclos) : could not find function "inp" Lesandro Veja quais s?o os assuntos do momento no Yahoo! +Buscados
2006 May 24
2
Decimal places
B??dnie zakodowany tekst zosta? usuni?ty... Plik: nie znany Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060524/ba180973/attachment.pl
2010 Mar 26
1
Trouble loading package
I am trying to load a package called Rmark, but when I run library(Rmark) I get the following: > library(RMark) Error in !character.only : invalid argument type Error in library(RMark) : .First.lib failed for 'RMark' When I try to load Rmark from the packages menu, I get: > local({pkg <- select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg,
2011 Feb 26
2
how to remove rows in which 2 or more observations are smaller than a given threshold?
Hello The data set I am examining has 7425 observations (rows with unique identifiers) and 46 samples(columns). I have been trying to generate a dataset that filters out observations that are "negligible" The definition of "negligible" is absolute value less or equal to 1.58. The rule that I would like to adopt to create a new data is: drop rows in which 2 or more
2001 Sep 25
2
glm.nb, anova.negbin
Dear R-collegues, I'm getting an error message (Error in round) when summarising a glm.nb model, and when using anova.negbin (in R 1.3.1 for windows): > m.nb <- glm.nb(tax ~ areal) > m.bn Call: glm.nb(formula = tax ~ areal, init.theta = 5.08829537115498, link = log) Coefficients: (Intercept) areal 3.03146 0.03182 Degrees of Freedom: 283 Total (i.e. Null); 282
2007 Jun 08
2
legend + expression
Dear all; A simple? question. I'm having a problem with a math expression in the legend of a plot and I haven't found the way to get this to work, so any help will be appreciate. Basically I want to include in the plot is the R-squared and its numerical value, so I tried this: R2c<-0.82879 # R-squared of calibration model plot(1:10,1:10) legend("topleft",
2004 Mar 03
3
Adding text (coefts) to pairs panels
Hi, First of all, thanks for the efforts of all the developers and contributors - I'm very new to R and at the moment am just using it to create some graphics, but it seems to be quite powerful. I've googled the archives and wasn't able to find anyhting that dealt with this problem, so would appreciate any suggestions/tips. In a pairs plot I'd like to plot a linear regression line
2009 Nov 13
2
format (PR#14062)
Full_Name: Dirk Jacob Version: R 2.8.1 and 2.9.1 OS: Win XP Submission from: (NULL) (153.96.32.62) I want to convert numbers to strings like: > inputs= c(0.3+0*(1:12) ) > (format(inputs,digits=3,scientific=T,collapse=" ")) and it works [1] "3e-01" "3e-01" "3e-01" "3e-01" "3e-01" "3e-01" "3e-01"
2007 Mar 08
2
curve of density on histogram
Hi R users, I would like to know why these following curve densities don't appear correctly on the histograms. Thank you for your help library(lattice) library(grid) resp <- rnorm(2000) group <- sample(c("G1", "G2", "G3", "G4"), replace = TRUE, size = 1000) histogram(~ resp | group, col="steelblue", panel = function(x, ...){ std
2010 Aug 27
3
interpreting date-related error message
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the following error message: Error in prettyNum(.Internal(format(x, trim, digits,
2012 Apr 14
1
R Error/Warning Messages with library(MASS) using glm.
Hi there, I have been having trouble running negative binomial regression (glm.nb) using library MASS in R v2.15.0 on Mac OSX. I am running multiple models on the variables influencing the group size of damselfish in coral reefs (count data). For total group size and two of my species, glm.nb is working great to deal with overdispersion in my count data. For two of my species, I am getting a
2009 Nov 10
1
2 significant digits
Hi, How to represent a rounded number ending with 0 with 2-significant digits? If I have for ex, 0.8031 and I use signif or round with digits = 2, I'll get 0.8. If I use format, I get character type (even if I pass number as parameter) and if I convert with as.numeric, I'll lose one significant digit (0): > format(13.7, nsmall = 2) [1] "13.70" > as.numeric( format(13.7,
2010 Jun 05
3
Wilcoxon test output as a table
Hi! I searched some time ago a way to get the Wilcoxon test results as a table more or less formatted. Nobody told me any solution and I found nothing on the Internet. Recently I came across this link ( http://myowelt.blogspot.com/2008/04/beautiful-correlation-tables-in-r.html), which helped me to find a solution. Here's the solution (I'm using R Commander): W <-