similar to: decimal troubles ?

Displaying 20 results from an estimated 10000 matches similar to: "decimal troubles ?"

2008 Dec 22
3
Convert ASCII string to Decimal in R (vice versa) was: Hex
Hi Dieter, Sorry my mistake. I wanted to convert them into Decimal (not Hexadecimal). Given this string, the desired answer follows: > ascii_str <- "ORQ>IK" 79 82 81 62 73 75 > ascii_str2 <- "FDC" 70 68 67 - Gundala Viswanath Jakarta - Indonesia On Mon, Dec 22, 2008 at 5:49 PM, Dieter Menne <dieter.menne at menne-biomed.de> wrote: > Gundala
2009 Apr 20
8
bug when subtracting decimals?
Try this: 0.7-0.3==0.4 (We get FALSE) 0.7-0.3<0.4 (We get TRUE) but 0.8-0.3==0.5 (TRUE) 0.8-0.3<0.5 (FALSE) Funny, he? There is a way around: round(0.7-0.3,1)==0.4 (TRUE) Obviously there is a problem with some combinations of decimal subtractions, that - we have the feeling - shouldt be solved. Best regards Sven & Wolfgang -- View this message in context:
2009 Apr 20
8
bug when subtracting decimals?
Try this: 0.7-0.3==0.4 (We get FALSE) 0.7-0.3<0.4 (We get TRUE) but 0.8-0.3==0.5 (TRUE) 0.8-0.3<0.5 (FALSE) Funny, he? There is a way around: round(0.7-0.3,1)==0.4 (TRUE) Obviously there is a problem with some combinations of decimal subtractions, that - we have the feeling - shouldt be solved. Best regards Sven & Wolfgang -- View this message in context:
2006 Apr 11
2
Schema.rb and MySQL decimal
Hi, I have a mysql schema with some decimal(20,20) fields. Now, I made a rake db_schema_dump for deployment of my applications on other machines. Rails created a schema.rb with the decimal fields as float. After a rake db_schema_import the fields are just float not decimal. How can I force rails to create decimal(20,20) columns instead of float? Thx. Marc -- Posted via
2007 Sep 06
2
larger decimal numbers get rounded ....
Hi, I am sure there is a reason but ...... why larger decimal numbers get rounded to the nearest integer? Example: a <- 3308000.5 a [1] 3308001 I would like my numbers to be decimals .... since they do represent coordinates and i don't want them rounded .... how can i keep them as they are? Thanks, Monica _________________________________________________________________
2008 Nov 07
15
any tricks re using " eql(5.5)", but where 5.5 is a decimal not float?
-- Sent from my mobile device
2006 Mar 28
3
R, RMysql, and MySQL 5 Decimal Type Support
Hi, Whenever I have a MySQL query that returns a Decimal result to R I get the following warning in R: Warning message: RS-DBI driver warning: (unrecognized MySQL field type 246 in column 1) I get this for a simple query like "SELECT 2, 2.5" !! I am using: R ver 2.1.1 RMySQL ver. 0.5-7 DBI ver. 0.1-10 MySQL Ver 14.12 Distrib 5.0.18. Please Help! Jason
2006 May 04
3
Decimal
Can someone please tell me the best approach to adding support for editing MySQL decimal types in rails? I have a field in the DB that represents currency, and the view will not let save anything past the decimal place so, 10.99 becomes 10.00 automatically. Any help is appreciated. -- Posted via http://www.ruby-forum.com/.
2006 Feb 15
2
Financial app - decimal to float conversion problem
I''m having problems with using Rails for a financial application: the database stores financial fields as decimal, but ActiveRecord converts these to float - so I get the rounding errors you''d expect (http://www.mindprod.com/jgloss/floatingpoint.html). This has come up recently, and the recommended fix seems to be to be Tobi Luetke''s ''money'' gem
2009 Aug 01
3
how do i retain decimal values
Hello, I am trying to do a spearman correlation. My data has tied values. To overcome this issue, I am adding some random noise (values) to my original data. However when I add the random noise to the data, the final matrix does not show the new values. I guess the reason being that the noise I add is very small and the full value including the decimals gets truncated to show only the value
2009 Jun 25
1
Lose of decimal when using write.table to text file
Good Day, I have the following: >Date<-c("08/05/08","08/06/08","08/07/08") >Weight<-c(209.4,211.8,210.0) >planned.meal<-cbind(Date,Weight) >planned.meal Date Weight 1 08/05/08, 209.4 2 08/06/08, 211.8 3 08/07/08, 210.0 >write.table(planned.meal, file="plannedMeal1.txt", + quote=FALSE, row.names=FALSE) output on
2018 May 07
2
read.csv and Decimal places
Hi, Novice UsR here. I have a csv file that contains 13 columns of numeric data that have decimal places (for the most part). After reading in the file RevFCast = read.csv("RevAnalysisNov2016_April2018.csv", header=TRUE, dec = ".", stringsAsFactors=FALSE) and viewing the data View(RevFCast) Some of the fields came in with the correct decimals and some not? The view in R:
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()
2009 May 20
2
round function seems to produce maximum 2 decimals
I am trying to use round()to force R to display a specific number of decimals, but it seems to display <=2 decimals no matter what I specify in the digits argument. As an alternative I tried signif(), but it also produces unexpected results. See example code and results below. Format() works, but then the result no longer is numeric. Am I missing something simple? I am using R 2.9.0 on Windows
2018 May 07
0
read.csv and Decimal places
The stored numbers are correct. They are rounded on printing. print(RevFCast, digits=17) See ?options And scroll down to digits. On Mon, May 7, 2018 at 11:50 Bill Poling <Bill.Poling at zelis.com> wrote: > Hi, Novice UsR here. > > I have a csv file that contains 13 columns of numeric data that have > decimal places (for the most part). > > After reading in the file >
2018 May 07
1
read.csv and Decimal places
... and see also ?print.data.frame , the "digits" argument. See also ?str It might be worth your while spending time with an R tutorial or two that covers such topics, i.e. distinguishing between an object and various (S3) methods that "represent" it, such as print(), summary(), plot() etc. -- Bert Bert Gunter "The trouble with having an open mind is that people keep
2008 Feb 26
2
AIC and anova, lme
Dear listers, Here we have a strange result we can hardly cope with. We want to compare a null mixed model with a mixed model with one independent variable. > lmmedt1<-lme(mediane~1, random=~1|site, na.action=na.omit, data=bdd2) > lmmedt9<-lme(mediane~log(0.0001+transat), random=~1|site, na.action=na.omit, data=bdd2) Using the Akaike Criterion and selMod of the package pgirmess
2008 Jan 19
1
Decimals are being converted to Bigdecimals!!!!!
Hi all, I''m working on a financial app, and have set up some columns in my tables as decimals with precision => 8 and scale => 2. My migration looks like: change_column :lineitems, :price, :decimal, :precision => 8, :scale => 2 change_column :payments, :amount, :decimal, :precision => 8, :scale => 2 I''ve run the migration and restarted the server. I
2012 Mar 02
2
Change DB data type and limited decimals
Rails3.1.3 I have db type, startp:integer I need to change it to float. More specifically, 1.2, 45.1, 143.8 ... I have two questions: 1. Is removing and adding the field through migration the only way? in other words, is there a single command to change the type? 2. Is there anyway to limit the decimal place to only one? 56.3, 34.2... are acceptable, but 23.112, 77.34, ... are
2006 Jan 17
9
Formatting a float with a set number of decimals
Another newbie question: How do i convert a float to a string, rounded to a certain number of decimals? Thanks -- Posted via http://www.ruby-forum.com/.