similar to: specify the number of decimal numbers

Displaying 20 results from an estimated 300 matches similar to: "specify the number of decimal numbers"

2009 May 08
2
Plotting questions
Hi, I am new to R. I have two questions about plotting in R: 1. How to plot several lines in a figure? Suppose I have several sets of points (xi,yi), where xi and yi are equal-length vector. plot(x1,y1) will give a line connecting these points. Another plot(x2,y2) will erase what plot before and plot the new line. Can I have these lines all drawn in the same figure? 2. How to open another figure
2008 Nov 11
3
FXTextField and number of digits after decimal point
Hello, Here''s the context: I read a number either pure integer or float with eventually up to 12 digits after the decimal point from a YAML file. The number is injected into a FXTextField with the following code: @value_sel = FXDataTarget.new(@value.to_s) @value_value = FXTextField.new(@matrix_mem_value, 20, at value_sel, :opts =>TEXTFIELD_NORMAL|JUSTIFY_RIGHT,
2012 Jul 07
5
number of decimal places in a number?
Dear R users, I need a function that gets a number and returns its number of actual decimal places. For example f(3.14) should return 2, f(3.142) should return 3, f(3.1400) should also return 2 and so on. Is such function already available in R? If not, could you give me a hint how to achieve that? Many thanks in advance. -----------------------------------------------------------------
2009 Sep 04
1
How to call R routines in C++`
Hi, I have some results generated in my C++ program. I 'd like to call some R functions that can test if two sample sets are from different distribution, like Kolmogorov-Smirnov and other more sophisticated Tests. I also like to draw the histograms of the two sample sets in the same plot using R. As a newbie to R, I greatly appreciate any suggestions on how to call R in C/C++ and
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment lines before data for each time interval. For each time interval there are 500 data points. I want to change the dataset such that I have the following format: t1 t2 t3 ................ 0.00208 0.00417 0.00625 ................. a1 a2 a3 ...................
2005 Nov 22
2
(PR#8337) formatC adds leading space -- on some Windoze
>>>>> "KevinW" == Kevin Wright <kwright68 at gmail.com> >>>>> on Mon, 21 Nov 2005 18:13:36 +0100 (CET) writes: KevinW> Full_Name: Kevin Wright KevinW> Version: 2.2.0 KevinW> OS: Windows 2000 ^^^^^^^ this must be part of the problem KevinW> Submission from: (NULL) (170.54.58.4) KevinW> Apologies if
2009 Jul 12
1
Splitting dataset for Tuning Parameter with Cross Validation
Hi, My question might be a little general. I have a number of values to select for the complexity parameters in some classifier, e.g. the C and gamma in SVM with RBF kernel. The selection is based on which values give the smallest cross validation error. I wonder if the randomized splitting of the available dataset into folds is done only once for all those choices for the parameter values, or
2010 Nov 29
1
Troubles in plotting to a postscript file (not to png)
Dear R users, I am trying to produce some plots in a postscript file, but I am experiencing some issues. I open the device with ----------------------------- setPS() postscript (file='gs_mcmc_dust.ps',width=5*3,height=5*3,horizontal = FALSE, paper = "special",family = "ComputerModern",encoding="TeXtext.enc")#, onefile = FALSE -----------------------------
2008 Feb 18
2
Number of digits of a value for problem 7.31 RFAQ
Hello dear R users! I did not find a function which gives information about the number of digits of a value shown by R. Do you know one? I need it to solve the problem (see RFAQ 7.31)that 0.2==0.2+0.1-0.1 FALSE The solution suggested in RFAQ is to use isTRUE(all.equal(0.2,0.2+0.1-0.1)) But if I want to compare inequality: 0.2<=0.2 +0.1-0.1 TRUE but 0.2<=0.2 +0.1-0.1 FALSE bad! but in
2006 Feb 23
3
Decimal comma instead of decimal point (i18n issue)
Hello, What is the easiest way which enables usage of decimal comma "," instead of decimal point (".") . I would like to force all RoR views to display float numbers with comma instead of decimal point and also to allow insertion of float numbers with comma in forms. Thanks in advance, Karel -- Posted via http://www.ruby-forum.com/.
2004 Dec 30
1
number format
This mailing list truly is amazing. Thank you so much for all the help! I feel a little strange asking something that "simple" again, but I wasn't able to find it in the help... Is there a way to tell R how to display numbers (double)? How many numbers after the decimal point, etc... Thanks again, folks and have a nice New Years Eve! Dax
2006 Jun 30
4
always show 2 decimal places
Hi, I have a float that often looks like somthing like 2003.2 in my controller (1 decimal place) Is there a way to always show it to 2 decimal places eg 2003.20 ? Thanks Scott -- Posted via http://www.ruby-forum.com/.
2008 Apr 22
0
numeric (decimal) WITH precision and scale at generate scaffold time?
Hello, I was wondering if anyone knew if it is (or ever will be ) possible at all to specify things like precision and scale at generate scaffold time, and if so how. Things like price:numeric(8,2) (obviously) just break the script. Tommy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2013 May 21
1
How many decimal places of information does R actually use in computation?
Dear R-users: Hi, I read here ( http://stackoverflow.com/questions/2287616/controlling-digits-in-r) that R is only accurate up to the 15th decimal place, despite the fact that if you choose to display more decimal places, it will. I wonder if R uses the information beyond the 15th decimal place in actual computation. Thanks! Best, Xiao [[alternative HTML version deleted]]
2010 Feb 15
2
Printing 2 digits after decimal point
Hi there, i'm not getting along with the following problem. I'd like to print a real number, e.g. x <- 12.3 with exactly two digits after the decimal point, e.g. 12.30 I've tried the whole format(), formatC() and prettyNum() functions but did not have any success with it. This should work with all real numbers, in case even with 0.0 (-> 0.00). For cracks this thing is pretty
2012 Oct 26
2
Number of decimal places
When estimating values ??each determined similarly, and in which get to them by algebraic operations in some cases, are rounded with 0 decimal places and in other cases with 2 or 3 decimal places. What is happening? Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Number-of-decimal-places-tp4647549.html Sent from the R help mailing list archive at Nabble.com.
2009 Nov 12
0
validates_uniquenes_of with decimal columns and mysql
I''m using this validation in my model: validates_uniqueness_of :zoom_level, :scope => [:latitude, :longitude] :latitude and :longitude are decimal columns in a mysql database. It isn''t working. I''ve searched in Google and I found that there were an error with MySQL but it''s supposed to be fixed. I''m using Rails 2.3.4. Is there a Rails solution
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>
2010 Sep 04
2
Decimal numbers pain
Hi, What do you guys use to definitely handle decimal numbers? This is getting me crazy! I use BigDecimal, but it craps out of the input number is something like "14,53", Rails transforms it as 14.0 Any solution? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2011 May 12
1
about vector to the power of a decimal
Hi why I can't do this? m<-c(1,-2,3) m^2.1 with a negative number in it ,but I can do this to a single negative number like -2^2.1~ Thank you ~ JIngsi [[alternative HTML version deleted]]