Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Given a vector of values, how would you convert it into a time series object?



Given a vector of values, how would you convert it into a time series object?..

Answer / Smita Singh

"To convert a vector of values into a time series object in R, use the ts() function. This function assumes that the data is evenly spaced and regular.nnExample:n```Rntime <- c(1:10)ndata <- c(2, 4, 6, 8, 10, 12, 14, 16, 18, 20)nmy_ts <- ts(data, start = c(2000, 1), frequency = 12)n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More R Programming Interview Questions

Explain how R programming applied to the real world?

1 Answers  


What is recursive function in r?

1 Answers  


How will you create scatterplot matrices in r language?

1 Answers  


How would you do a cross-product of two tables in r?

1 Answers  


How to create the s3 class?

1 Answers  


What are Generic Functions in R?

1 Answers  


Explain what is with () and by () function in r is used for?

1 Answers  


What is TCP/IP in R?

1 Answers  


Give the command to check if the element 15 is present in vector x?

1 Answers  


What makes a valid variable name in R?

1 Answers  


What is a factor?

1 Answers  


How would you do a left and right join in r?

1 Answers  


Categories