Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8650563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:51:11+00:00 2026-06-12T13:51:11+00:00

R wraps csv’d lists of numbers (comma separated values i.e. 1, 2, 3 )

  • 0

R wraps csv’d lists of numbers (comma separated values i.e. 1, 2, 3) in the c() function, a part of the R core library, which converts csv’d lists of numbers into vectors.

These vectors look like Ruby or Java arrays, with the exception that these csv’d lists are wrapped in c() rather than []. It seems like arrays are really a subset of vectors. Is it true? And if so, what does this mean when it comes to arrays and matrices?

One discussion on the subject I found stated that arrays are static vectors. But in Ruby, arrays aren’t static. In Ruby, arrays are vectors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:51:12+00:00Added an answer on June 12, 2026 at 1:51 pm

    Yep, in R an array is just a vector equipped with attributes that give the dimensions of the array.

    From ?array:

    Details:

    An array in R can have one, two or more dimensions. It is simply
    a vector which is stored with additional attributes giving the
    dimensions (attribute ‘”dim”’) and optionally names for those
    dimensions (attribute ‘”dimnames”’).

    A two-dimensional array is the same thing as a ‘matrix’.

    One-dimensional arrays often look like vectors, but may be handled
    differently by some functions: ‘str’ does distinguish them in
    recent versions of R.

    The ‘”dim”’ attribute is an integer vector of length one or more
    containing non-negative values: the product of the values must
    match the length of the array.

    Maybe the easiest way to see this for yourself is to have a look at a vector, a matrix, and a higher dimensional array, like this:

    a <- array(1:12, dim=c(2,2,3))
    m <- matrix(1:4, ncol=2)
    v <- c(1,2)
    
    is(a)
    # [1] "array"     "matrix"    "structure" "vector"    "vector"  
    is(m)
    # [1] "matrix"    "array"     "structure" "vector"
    is(v)
    # [1] "numeric" "vector" 
    
    attributes(a)
    # $dim
    # [1] 2 2 3
    attributes(m)
    # $dim
    # [1] 2 2
    attributes(v)
    # NULL
    
    ## Finally, try this
    v <- 1:12
    dim(v) <- c(2,2,3)
    v
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

.NET interop wraps COM objects into .NET objects (runtime-callable wrappers, RCWs), which hide the
I have a C++/CLI project that wraps around an unmanaged C compression library, and
I have an assembly which wraps the functionality of an external live web service.
I have a Date class which wraps over the DateTime? class (aids in mocking
I have a class which wraps another class and exposes several events from the
I want to create a class which wraps a list of structures. I have
I'm writing a library that wraps around a REST API. The wrapper I'm creating
functools.wraps is not available in python 2.4.Is there any other module which can be
The following command wraps the output to the width of the window from which
I have a class library that wraps the command line client for Mercurial. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.