unstrip: Reformat data as vector or matrix

Description Usage Arguments Details Value Author(s) Examples

View source: R/logspline.R

Description

This function tries to convert a date.frame or a matrix to a no-frills matrix without labels, and a vector or time-series to a no-frills vector without labels.

Usage

1

Arguments

x

one- or two-dimensional object.

Details

Many of the functions for logspline, oldlogspline, were written in the “before data.frame” era; unstrip attempts to keep all these functions useful with more advanced input objects. In particular, many of these functions call unstrip before doing anything else.

Value

If x is two-dimensional a matrix without names, if x is one-dimensional a numerical vector

Author(s)

Charles Kooperberg clk@fredhutch.org.

Examples

1
2
3
4

Example output

  [1] 315.42 316.31 316.50 317.56 318.13 318.00 316.39 314.65 313.68 313.18
 [11] 314.66 315.43 316.27 316.81 317.42 318.87 319.87 319.43 318.01 315.74
 [21] 314.00 313.68 314.84 316.03 316.73 317.54 318.38 319.31 320.42 319.61
 [31] 318.42 316.63 314.83 315.16 315.94 316.85 317.78 318.40 319.53 320.42
 [41] 320.85 320.45 319.45 317.25 316.11 315.27 316.53 317.53 318.58 318.92
 [51] 319.70 321.22 322.08 321.31 319.58 317.61 316.05 315.83 316.91 318.20
 [61] 319.41 320.07 320.74 321.40 322.06 321.73 320.27 318.54 316.54 316.71
 [71] 317.53 318.55 319.27 320.28 320.73 321.97 322.00 321.71 321.05 318.71
 [81] 317.66 317.14 318.70 319.25 320.46 321.43 322.23 323.54 323.91 323.59
 [91] 322.24 320.20 318.48 317.94 319.63 320.87 322.17 322.34 322.88 324.25
[101] 324.83 323.93 322.38 320.76 319.10 319.24 320.56 321.80 322.40 322.99
[111] 323.73 324.86 325.40 325.20 323.98 321.95 320.18 320.09 321.16 322.74
[121] 323.83 324.26 325.47 326.50 327.21 326.54 325.72 323.50 322.22 321.62
[131] 322.69 323.95 324.89 325.82 326.77 327.97 327.91 327.50 326.18 324.53
[141] 322.93 322.90 323.85 324.96 326.01 326.51 327.01 327.62 328.76 328.40
[151] 327.20 325.27 323.20 323.40 324.63 325.85 326.60 327.47 327.58 329.56
[161] 329.90 328.92 327.88 326.16 324.68 325.04 326.34 327.39 328.37 329.40
[171] 330.14 331.33 332.31 331.90 330.70 329.15 327.35 327.02 327.99 328.48
[181] 329.18 330.55 331.32 332.48 332.92 332.08 331.01 329.23 327.27 327.21
[191] 328.29 329.41 330.23 331.25 331.87 333.14 333.80 333.43 331.73 329.90
[201] 328.40 328.17 329.32 330.59 331.58 332.39 333.33 334.41 334.71 334.17
[211] 332.89 330.77 329.14 328.78 330.14 331.52 332.75 333.24 334.53 335.90
[221] 336.57 336.10 334.76 332.59 331.42 330.98 332.24 333.68 334.80 335.22
[231] 336.47 337.59 337.84 337.72 336.37 334.51 332.60 332.38 333.75 334.78
[241] 336.05 336.59 337.79 338.71 339.30 339.12 337.56 335.92 333.75 333.70
[251] 335.12 336.56 337.84 338.19 339.91 340.60 341.29 341.00 339.39 337.43
[261] 335.72 335.84 336.93 338.04 339.06 340.30 341.21 342.33 342.74 342.08
[271] 340.32 338.26 336.52 336.68 338.19 339.44 340.57 341.44 342.53 343.39
[281] 343.96 343.18 341.88 339.65 337.81 337.69 339.09 340.32 341.20 342.35
[291] 342.93 344.77 345.58 345.14 343.81 342.21 339.69 339.82 340.98 342.82
[301] 343.52 344.33 345.11 346.88 347.25 346.62 345.22 343.11 340.90 341.18
[311] 342.80 344.04 344.79 345.82 347.25 348.17 348.74 348.07 346.38 344.51
[321] 342.92 342.62 344.06 345.38 346.11 346.78 347.68 349.37 350.03 349.37
[331] 347.76 345.73 344.68 343.99 345.48 346.72 347.84 348.29 349.23 350.80
[341] 351.66 351.07 349.33 347.92 346.27 346.18 347.64 348.78 350.25 351.54
[351] 352.05 353.41 354.04 353.62 352.22 350.27 348.55 348.72 349.91 351.18
[361] 352.60 352.92 353.53 355.26 355.52 354.97 353.75 351.52 349.64 349.83
[371] 351.14 352.37 353.50 354.55 355.23 356.04 357.00 356.07 354.67 352.76
[381] 350.82 351.04 352.69 354.07 354.59 355.63 357.03 358.48 359.22 358.12
[391] 356.06 353.92 352.05 352.11 353.64 354.89 355.88 356.63 357.72 359.07
[401] 359.58 359.17 356.94 354.92 352.94 353.23 354.09 355.33 356.63 357.10
[411] 358.32 359.41 360.23 359.55 357.53 355.48 353.67 353.95 355.30 356.78
[421] 358.34 358.89 359.95 361.25 361.67 360.94 359.55 357.49 355.84 356.00
[431] 357.59 359.05 359.98 361.03 361.66 363.48 363.82 363.30 361.94 359.50
[441] 358.11 357.80 359.61 360.74 362.09 363.29 364.06 364.76 365.45 365.01
[451] 363.70 361.54 359.51 359.65 360.80 362.38 363.23 364.06 364.61 366.40
[461] 366.84 365.68 364.52 362.57 360.24 360.83 362.49 364.34
       [,1] [,2] [,3] [,4] [,5]
  [1,]  5.1  3.5  1.4  0.2    1
  [2,]  4.9  3.0  1.4  0.2    1
  [3,]  4.7  3.2  1.3  0.2    1
  [4,]  4.6  3.1  1.5  0.2    1
  [5,]  5.0  3.6  1.4  0.2    1
  [6,]  5.4  3.9  1.7  0.4    1
  [7,]  4.6  3.4  1.4  0.3    1
  [8,]  5.0  3.4  1.5  0.2    1
  [9,]  4.4  2.9  1.4  0.2    1
 [10,]  4.9  3.1  1.5  0.1    1
 [11,]  5.4  3.7  1.5  0.2    1
 [12,]  4.8  3.4  1.6  0.2    1
 [13,]  4.8  3.0  1.4  0.1    1
 [14,]  4.3  3.0  1.1  0.1    1
 [15,]  5.8  4.0  1.2  0.2    1
 [16,]  5.7  4.4  1.5  0.4    1
 [17,]  5.4  3.9  1.3  0.4    1
 [18,]  5.1  3.5  1.4  0.3    1
 [19,]  5.7  3.8  1.7  0.3    1
 [20,]  5.1  3.8  1.5  0.3    1
 [21,]  5.4  3.4  1.7  0.2    1
 [22,]  5.1  3.7  1.5  0.4    1
 [23,]  4.6  3.6  1.0  0.2    1
 [24,]  5.1  3.3  1.7  0.5    1
 [25,]  4.8  3.4  1.9  0.2    1
 [26,]  5.0  3.0  1.6  0.2    1
 [27,]  5.0  3.4  1.6  0.4    1
 [28,]  5.2  3.5  1.5  0.2    1
 [29,]  5.2  3.4  1.4  0.2    1
 [30,]  4.7  3.2  1.6  0.2    1
 [31,]  4.8  3.1  1.6  0.2    1
 [32,]  5.4  3.4  1.5  0.4    1
 [33,]  5.2  4.1  1.5  0.1    1
 [34,]  5.5  4.2  1.4  0.2    1
 [35,]  4.9  3.1  1.5  0.2    1
 [36,]  5.0  3.2  1.2  0.2    1
 [37,]  5.5  3.5  1.3  0.2    1
 [38,]  4.9  3.6  1.4  0.1    1
 [39,]  4.4  3.0  1.3  0.2    1
 [40,]  5.1  3.4  1.5  0.2    1
 [41,]  5.0  3.5  1.3  0.3    1
 [42,]  4.5  2.3  1.3  0.3    1
 [43,]  4.4  3.2  1.3  0.2    1
 [44,]  5.0  3.5  1.6  0.6    1
 [45,]  5.1  3.8  1.9  0.4    1
 [46,]  4.8  3.0  1.4  0.3    1
 [47,]  5.1  3.8  1.6  0.2    1
 [48,]  4.6  3.2  1.4  0.2    1
 [49,]  5.3  3.7  1.5  0.2    1
 [50,]  5.0  3.3  1.4  0.2    1
 [51,]  7.0  3.2  4.7  1.4    2
 [52,]  6.4  3.2  4.5  1.5    2
 [53,]  6.9  3.1  4.9  1.5    2
 [54,]  5.5  2.3  4.0  1.3    2
 [55,]  6.5  2.8  4.6  1.5    2
 [56,]  5.7  2.8  4.5  1.3    2
 [57,]  6.3  3.3  4.7  1.6    2
 [58,]  4.9  2.4  3.3  1.0    2
 [59,]  6.6  2.9  4.6  1.3    2
 [60,]  5.2  2.7  3.9  1.4    2
 [61,]  5.0  2.0  3.5  1.0    2
 [62,]  5.9  3.0  4.2  1.5    2
 [63,]  6.0  2.2  4.0  1.0    2
 [64,]  6.1  2.9  4.7  1.4    2
 [65,]  5.6  2.9  3.6  1.3    2
 [66,]  6.7  3.1  4.4  1.4    2
 [67,]  5.6  3.0  4.5  1.5    2
 [68,]  5.8  2.7  4.1  1.0    2
 [69,]  6.2  2.2  4.5  1.5    2
 [70,]  5.6  2.5  3.9  1.1    2
 [71,]  5.9  3.2  4.8  1.8    2
 [72,]  6.1  2.8  4.0  1.3    2
 [73,]  6.3  2.5  4.9  1.5    2
 [74,]  6.1  2.8  4.7  1.2    2
 [75,]  6.4  2.9  4.3  1.3    2
 [76,]  6.6  3.0  4.4  1.4    2
 [77,]  6.8  2.8  4.8  1.4    2
 [78,]  6.7  3.0  5.0  1.7    2
 [79,]  6.0  2.9  4.5  1.5    2
 [80,]  5.7  2.6  3.5  1.0    2
 [81,]  5.5  2.4  3.8  1.1    2
 [82,]  5.5  2.4  3.7  1.0    2
 [83,]  5.8  2.7  3.9  1.2    2
 [84,]  6.0  2.7  5.1  1.6    2
 [85,]  5.4  3.0  4.5  1.5    2
 [86,]  6.0  3.4  4.5  1.6    2
 [87,]  6.7  3.1  4.7  1.5    2
 [88,]  6.3  2.3  4.4  1.3    2
 [89,]  5.6  3.0  4.1  1.3    2
 [90,]  5.5  2.5  4.0  1.3    2
 [91,]  5.5  2.6  4.4  1.2    2
 [92,]  6.1  3.0  4.6  1.4    2
 [93,]  5.8  2.6  4.0  1.2    2
 [94,]  5.0  2.3  3.3  1.0    2
 [95,]  5.6  2.7  4.2  1.3    2
 [96,]  5.7  3.0  4.2  1.2    2
 [97,]  5.7  2.9  4.2  1.3    2
 [98,]  6.2  2.9  4.3  1.3    2
 [99,]  5.1  2.5  3.0  1.1    2
[100,]  5.7  2.8  4.1  1.3    2
[101,]  6.3  3.3  6.0  2.5    3
[102,]  5.8  2.7  5.1  1.9    3
[103,]  7.1  3.0  5.9  2.1    3
[104,]  6.3  2.9  5.6  1.8    3
[105,]  6.5  3.0  5.8  2.2    3
[106,]  7.6  3.0  6.6  2.1    3
[107,]  4.9  2.5  4.5  1.7    3
[108,]  7.3  2.9  6.3  1.8    3
[109,]  6.7  2.5  5.8  1.8    3
[110,]  7.2  3.6  6.1  2.5    3
[111,]  6.5  3.2  5.1  2.0    3
[112,]  6.4  2.7  5.3  1.9    3
[113,]  6.8  3.0  5.5  2.1    3
[114,]  5.7  2.5  5.0  2.0    3
[115,]  5.8  2.8  5.1  2.4    3
[116,]  6.4  3.2  5.3  2.3    3
[117,]  6.5  3.0  5.5  1.8    3
[118,]  7.7  3.8  6.7  2.2    3
[119,]  7.7  2.6  6.9  2.3    3
[120,]  6.0  2.2  5.0  1.5    3
[121,]  6.9  3.2  5.7  2.3    3
[122,]  5.6  2.8  4.9  2.0    3
[123,]  7.7  2.8  6.7  2.0    3
[124,]  6.3  2.7  4.9  1.8    3
[125,]  6.7  3.3  5.7  2.1    3
[126,]  7.2  3.2  6.0  1.8    3
[127,]  6.2  2.8  4.8  1.8    3
[128,]  6.1  3.0  4.9  1.8    3
[129,]  6.4  2.8  5.6  2.1    3
[130,]  7.2  3.0  5.8  1.6    3
[131,]  7.4  2.8  6.1  1.9    3
[132,]  7.9  3.8  6.4  2.0    3
[133,]  6.4  2.8  5.6  2.2    3
[134,]  6.3  2.8  5.1  1.5    3
[135,]  6.1  2.6  5.6  1.4    3
[136,]  7.7  3.0  6.1  2.3    3
[137,]  6.3  3.4  5.6  2.4    3
[138,]  6.4  3.1  5.5  1.8    3
[139,]  6.0  3.0  4.8  1.8    3
[140,]  6.9  3.1  5.4  2.1    3
[141,]  6.7  3.1  5.6  2.4    3
[142,]  6.9  3.1  5.1  2.3    3
[143,]  5.8  2.7  5.1  1.9    3
[144,]  6.8  3.2  5.9  2.3    3
[145,]  6.7  3.3  5.7  2.5    3
[146,]  6.7  3.0  5.2  2.3    3
[147,]  6.3  2.5  5.0  1.9    3
[148,]  6.5  3.0  5.2  2.0    3
[149,]  6.2  3.4  5.4  2.3    3
[150,]  5.9  3.0  5.1  1.8    3

logspline documentation built on July 2, 2020, 4:04 a.m.

Related to unstrip in logspline...