Re: [R] Finding the name "vector"

From: Joshua Wiley <jwiley.psych_at_gmail.com>
Date: Mon, 14 Mar 2011 22:17:19 -0700

Hi Laura,

?is.vector

> is.vector(1:10)

[1] TRUE
> is.vector(matrix(1:10))

[1] FALSE Cheers,

Josh

On Mon, Mar 14, 2011 at 9:58 PM, Laura Smith <smithlaura937_at_gmail.com> wrote:
> Hello:
>
> Here are some basic class items:
>
>> x <- 1:10
>> class(x)
> [1] "integer"
>> x.mat <- matrix(1:6,nrow=2)
>> class(x.mat)
> [1] "matrix"
>> class(x>3)
> [1] "logical"
>> test <- function() { plot(1:10) }
>> class(test)
> [1] "function"
>>
>
> Is there something that says "vector", please?  Or does it go to numeric,
> logical, or integer, please?
>
> Thank you.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 15 Mar 2011 - 05:23:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Mar 2011 - 11:10:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive