19789

Converting character variabls to numeric in SAS

Question:

I am creating a numeric version of a character variable in SAS. I am using the best32. numeric format along with an input statement, as I do not want to lose any data.

Below is an example that in which SAS is dropping data and I am unclear as to why.

DATA trial; X='1264263.336532'; Y=INPUT(X,BEST32.); PUT Y; RUN;

Y is only 1264263.3365 and not X. I am unsure why this is happening.

Answer1:

SAS is displaying the number in the default BEST12. format. Try PUT Y best32.; instead

Recommend

  • using react-with-style to style a react-dates component
  • jQuery data value not updating
  • How to get a TypeSafe URL to a static resource in Yesod
  • Merging Users in Kinvey
  • Removing levels from data frame read from CSV file - R
  • Plot a table with R
  • Can someone please explain how this implementation of bucket sort works?
  • How can I get a specific version of a dataset row?
  • Select count of rows that have a certain number of rows in a related table
  • addressing in assembler
  • Get rendered html code in Backing Component from Composite Component
  • FragmentActivity with a Fragment Containing a MapView
  • Always require certain dependencies in RequireJS
  • Neo4j: Filter nodes based on aggregate function
  • What is corresponding c++ data type to SQL numeric(18,0) data type?
  • .NET video play library which allows to change the playback rate?
  • Python pandas melting data to multiple columns and coulmn names in another column
  • How to 'create temp table as select' in Slick?
  • MySQL Order by column = x, column asc?
  • Initializer list vs. initialization method
  • Control modification in presentation layer
  • Java Scanner input dilemma. Automatically inputs without allowing user to type
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • Fetching methods from BroadcastReceiver to update UI
  • Deserializing XML into class C#
  • what is the difference between the asp.net mvc application and asp.net web application
  • Weird JavaScript statement, what does it mean?
  • Font Awesome Showing Box instead of Icons
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • Matrix multiplication with MKL
  • How to include full .NET prerequisite for Wix Burn installer
  • embed rChart in Markdown
  • Is it possible to post an object from jquery to bottle.py?
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • costura.fody for a dll that references another dll
  • Binding checkboxes to object values in AngularJs
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • Python/Django TangoWithDjango Models and Databases
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize