Displaying 20 results from an estimated 6000 matches similar to: "undesirable rounding off due to 'read.table' (PR#8974)"
2009 Oct 29
2
Rounding and printing
Hello,
I am trying to print a table with numbers all rounded to the same number of digits (one after the decimal), but R seems to want to not print ".0" for integers. I can go in and fix it one number at a time, but I'd like to understand the principle. Here's an example of the code. The problem is the 13th element, 21 or 21.0:
>nvb_deaths <- round(ss[,10]/100,digits=1)
2012 Jun 27
4
[V4]fix ocfs2 aio/dio writing process hang
V4 changes:
add Acked-by: Joel Becker <jlbec at evilplan.org>
V3 changes:
- add Cc: stable at vger.kernel.org in the patch header to align with stable rules
- add Acked-by: Jeff Moyer <jmoyer at redhat.com>
V2 changes:
- update the patch header of the first patch to make it more clear.
This patch list fixes an issue about ocfs2 aio/dio write process hang.
The call trace is like
2011 Oct 26
4
openldap missing modules
Hi List,
I'm currently setting up an openldap server and included the following
lines in my slapd.conf :
modulepath /usr/lib/ldap
moduleload back_hdb
after finishing up my config and i run slaptest on it i get an error
saying that the modulepath doesn't exist.
I checked and it indeed isn't there , in fact i can find it anywhere on my
system (centos 5.7).
the packages i've
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group,
I try to write a frame to a table (RODBC). I use
colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean")
sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE)
This is giving me an error:
Error in
2011 Dec 09
3
ggplot with geom_tile
Dear R-users,
I am trying to make a plot with ggplot-geom_tile(), but cannot remove some unwanted (white) lines through my plot.
Below a reproducible example:
#####
library(ggplot2)
tot=as.data.frame(rep(seq(-50,50,5),each=21))
names(tot)="precip"
temp=rep(seq(-5,5,0.5),21)
tot$temp=temp
disc=array(dim=c(21,21))
for(i in 1:21){
for(y in 1:21){
temp<-
2012 Mar 07
2
hfs with extended attribute support
Hi all,
I?ve got a HFS+(not journaled) volume connected to my centos6.2 test
server, i installed the kmod-hfs(plus) packages and read/write works all
fine.
but since i?m going to use this for serving mac home folders via
netatalk i would like to mount it with support for Extended Attributes
and acl?s.
so i add user_xattr and acl to my fstab options but then it fails to mount.
checking the
2007 Sep 16
8
Rounding up to two decimal places
Hi there
I am going to calculate VAT at one of my websites, and UK VAT is 17.5
%.
So the question is how to round up some value to two decimal points?
I often get values like 6,991..
In php I was using round function
round($price, 2)
is in ruby something similat to PHP''s round function where I could
specify number of decimal places ?
P.
2006 Apr 06
1
rounding of voronoi vertices using deldir()
Hello list,
I'm just getting started with using R - I have been trying over the past
day or so to work out a method for generating voronoi polygons for
PostGIS using SQL. I was able to put together a procedure which works
relatively well, but is somewhat inefficient. Someone on the PostGIS
list pointed me to the deldir() function in R, for which I can export a
text file with x/y coordinates
2006 Apr 11
3
problems with rounding in output
Perhaps someone will have a solution to my more general problem, but
here is the specific one:
I used the round() function to round some estimates to 3 decimal
places. I then sent put the rounded estimates in a matrix and used
latex() to make a LaTeX table from them. However, in my table, there
are estimtes which only have 2 decimal places. I assume that the third
decimal place in these numbers
2000 Oct 18
1
reference for round
The help for the round function states:
round rounds the values in its first argument to the specified number of
decimal places (default 0). Note that for rounding
off a 5, the IEEE standard is used, ``go to the even digit''. Therefore
round(0.5) is 0 and round(-1.5) is -2.
Could someone provide a reference for this standard?
Thanks, Anne
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anne E.
2005 Mar 02
1
Rounding parameter values in genoud(), Rgenoud package
I would like to limit the significant figures of the calibrated
parameters determined by genoud() in the Rgenoud package. Below is some
example output, where column 1 is model run number, columns 2-7 are the
parameter values, and columns 8-12 are model fit statistics. I would
like genoud to internally limit parameters to 4 decimal places as shown
in this output. It is clear that the function is
2011 Mar 07
2
connection speeds between nodes
Hi All,
I've been asked to setup a 3d renderfarm at our office , at the start it
will contain about 8 nodes but it should be build at growth. now the
setup i had in mind is as following:
All the data is already stored on a StorNext SAN filesystem (quantum )
this should be mounted on a centos server trough fiber optics , which
in its turn shares the FS over NFS to all the rendernodes
2011 Oct 20
1
stop R from rounding
Hello,
I have a column in a data frame that need to be 10 digits long. As such:
Decimal.Year
1 1994.25997
2 1994.26020
However, R keeps rounding the digits. As such:
Decimal.Year
1 1994.260
2 1994.260
*Is there any way to stop this from happening?*
Here is how I created the data frame:
x <- read.table('bats_1994_CTD.txt')
colnames(x) <-
2004 Feb 05
2
Available in S-plus, also in R1.8.1?
Hello all,
I'm looking for the R-equivalent of the S-option "Connect type: half
horiz first". Link:
http://miner.stern.nyu.edu/Splus/help/guihelp/__hhelp/connect_type.htm
I'm plotting with type="s" or type="S"; this is giving me a stairstep
starting, or ending with the value on the x-axis (as documented). But, I
want the x-value in the middle of the step,
2006 Nov 13
3
Mysql 6 second rounding
This is more of mysql question then asterisk :D . Most voip providers use 6
second rounding for costing . My asterisk server stores call cdr's in mysql
properly with billsec field containing number of billed seconds . I want to
know some function to round this to 6 seconds ( or any custom valud like 30
seconds ) ..Suppose if billsec field is 3 seconds then it should round to 6
seconds , if
2007 Dec 17
4
read.table() and precision?
Hi,
I'm currently working with data that has values as large as 99,000,000
but is accurate to 6 decimal places. Unfortunately, when I load the
data using read.table(), it rounds everything to the nearest integer.
Is there any way for me to preserve the information or work with
arbitrarily large floating point numbers?
Thank you,
Wojciech
--
Five Minutes to Midnight:
Youth on human rights
2009 Aug 17
4
Rounding to the nearest 5
Dear all,
A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places.
Thanks,
Steve
_________________________________________________________________
icons.
2010 Apr 28
2
unexpected result from format(x, digits)
Is this a bug somewhere? The format function, using a specific number of digits, doesn't give sensible results:
R> set.seed(2);print(x<-rexp(5))
[1] 1.86535 0.40475 0.14665 1.73071 0.08953
R> format(x,digits=1)
[1] "1.87" "0.40" "0.15" "1.73" "0.09"
R> format(x,digits=2)
[1] "1.87" "0.40" "0.15"
2018 Mar 14
2
truncation/rounding bug with write.csv
To my surprise, I can confirm on Windows 10 using R 3.4.3 . As tail is not
recognized by Windows cmd, I replaced with:
system('powershell -nologo "& "Get-Content -Path temp.csv -Tail 1')
The last line shows only 7 digits after the decimal, whereas the first have
15 digits after the decimal. I agree with Dirk though, 1.6Gb csv files are
not the best way to work with
2010 Oct 20
1
rounding up (always)
Hello!
I am trying to round the number always up - i.e., whatever the
positive number is, I would like it to round it to the closest 10 that
is higher than this number, the closest 100 that is higher than this
number, etc.
For example:
x<-3241.388
signif(x,1) rounds to the closest thousand, i.e., to 3,000, but I'd
like to get 4,000 instead.
signif(x,2) rounds to the closest hundred,