Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visually Inspecting Data in R

Tags:

r

First I want to point I am a very visual person, and so I would like to see the time series data I have in cells when I load it into R. I know I can use the Fix(data) command to vizually inspect the data in cells but what If have a single data vector.

How do I get R to show a single time series data vector in cells? Everytime I use the fix(singlevariable) it shows it akwardly as C(.....).

How do I show two or more data series in R in a cell visual format? I cant say fix(variable1, variable2)

Help! Thank you!

like image 292
alphabeta Avatar asked Oct 06 '12 00:10

alphabeta


1 Answers

To view a single vector, you can use View(), which "invoke[s] a spreadsheet-style data viewer on a matrix-like R object."

X <- 1:10
View(X)

To view two equally long vectors side by side, just place them together in a data.frame and then view that with View(), fix() or edit():

X <- 1:10
Y <- rnorm(10)
XY <- data.frame(X, Y)
fix(XY)   ## or View(XY) or edit(XY)
like image 184
Josh O'Brien Avatar answered Nov 08 '22 04:11

Josh O'Brien