R语言中有哪些取整运算?

Python018

R语言中有哪些取整运算?,第1张

R语言中取整运算主要包括以下五种:floor():向下取整;ceiling(): 向上取整;round(): 四舍五入取整;turnc(): 向0取整;signif(): 保留给定位数的精度。

floor返回对应数字的'地板'值,即不大于该数字的最大值;

ceiling返回对应数字的'天花板'值,就是不小于该数字的最小整数;

round是R里的'四舍五入'函数,具体的规则采用banker's rounding,即四舍六入五留双规则(wiki)。round的原型是round(x, digits = 0), digits设定小数点位置,默认为零即小数点后零位(取整)。

trun的特性是'向零截取', 也就是说对于一个数字a,它将数轴分成两侧,trunc(a)将返回数轴上包含数字0的那一侧离a最近的那个整数。

signif是保留有效数字的函数。常用于科学计数。

The Dead Sea is located in Israel and Jordan, about 15 miles east of Jerusalem. (A map of the Dead Sea Region is available). It is extremely deep (averaging about 1,000 feet), salty (some parts containing the highest amount of salts possible), and the lowest body of water in the world. The Dead Sea is supplied by a number of smaller streams, springs, and the Jordan River.

Because of its low elevation and its position in a deep basin, the climate of the Dead Sea area is unusual. Its very high evaporation does produce a haze yet its atmospheric humidity is low. Adjacent areas to it are very arid and favorable for the preservation of materials like the Dead Sea Scrolls.

The Bible's description, in Genesis 19, of a destructive earthquake near the Dead Sea area during the time of Abraham is borne out by archaeological and historic investigation. While no evidence remains of the five cities of the plain (Zeboim, Admah, Bela or Zoar, Sodom, and Gomorrah) their sites are believed to be beneath the waters at the southern end of the sea.

Archaeological sites near the Dead Sea include Masada, Ein Gedi, and Qumran (where the Dead Sea Scrolls were found).

http://en.wikipedia.org/wiki/List_of_cities_in_South_Carolina

wiki里面的南卡罗来纳州所有城市列表...(按照字母顺序排的)

A

Abbeville

Aiken

Anderson

[edit] B

Bamberg

Barnwell

Beaufort

Belton

Bennettsville

Bishopville

[edit] C

Camden

Cayce

Charleston

Chesnee

Chester

Clemson

Clinton

Columbia

Conway

[edit] D

Darlington

Denmark

Dillon

[edit] E

Easley

[edit] F

Florence

Folly Beach

Forest Acres

Fountain Inn

[edit] G

Gaffney

Georgetown

Goose Creek

Greenville

Greenwood

Greer

[edit] H

Hanahan

Hardeeville

Hartsville

[edit] I

Inman

Isle of Palms

[edit] J

Johnsonville

[edit] L

Lake City

Lancaster

Landrum

Laurens

Liberty

Loris

[edit] M

Manning

Marion

Mauldin

Mullins

Myrtle Beach

[edit] N

Newberry

North Augusta

North Charleston

North Myrtle Beach

[edit] O

Orangeburg

[edit] P

Pickens

[edit] R

Rock Hill

[edit] S

Seneca

Simpsonville

Spartanburg

Sumter

[edit] T

Tega Cay

Travelers Rest

[edit] U

Union

[edit] W

Walhalla

Walterboro

Wellford

West Columbia

Westminster

Woodruff

&

York