Physical constants in R

后端 未结 5 1738
挽巷
挽巷 2020-12-19 04:04

Just curious - is there a package or dataset somewhere containing values for physical constants? I only ask because I\'ve now typed in 273.15 (Celsius to Kelvi

5条回答
  •  粉色の甜心
    2020-12-19 04:28

    May I recommend 2 options:

    1) If you need these constants all the time you could make use of the .First library in the form of C2K<-273.15. You can assign constants and store them there. For more on this see http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_first.html

    2) If you want to use the files only sometimes save the constants in a text file in the same format as above x<-273.15 and then source the path to this file using the source function in the following format: source(C:\Users\PAth to save file text\formulas.txt)

    This gives you more control over the constants than relying on a package that may or may not contain what you want.

提交回复
热议问题