R-intro which should be part of your R
installation.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Drake Gossi
> Sent: Saturday, April 20, 2019 1:40 AM
> To: r-help@r-project.org
> Subject: [R] creating a data.frame from scratch
>
> Hello everyone,
&g
You seem to be trying to learn R ... sideways... or backwards, perhaps.
Have you read An Introduction to R[1], included with every copy of the
software? In particular, there are sections on data frames [2] (which
should be read in the context of the discussion on lists, as it
is presented. The
Hello everyone,
Is there any way to create a data.frame from scratch? other than, say, this?
> structure(list(Fruit = structure(c(1L, 2L, 5L, 4L, 3L), .Label =
c("apple",
"banana", "kiwi", "orange", "pear"), class = "factor"), Color =
structure(c(3L,
4L, 1L, 2L, 1L), .Label = c("green", "orange",
Just make d <- data.frame(x,y,z).
cbind forces x,y and z to be of the same type.
--- Joe Trubisz <[EMAIL PROTECTED]> wrote:
> OK...newbie question here.
> Either I'm reading the docs wrong, or I'm totally
> confused.
>
> Given the following:
>
> x<-c("aaa","bbb","ccc")
> y<-rep(0,3)
> z<-rep(0
On 13-Feb-08 22:17:32, Joe Trubisz wrote:
> OK...newbie question here.
> Either I'm reading the docs wrong, or I'm totally confused.
> Given the following:
>
> x<-c("aaa","bbb","ccc")
> y<-rep(0,3)
> z<-rep(0,3)
>
> is.character(x)
> [1] TRUE
>
> is.numeric(y)
> [1] TRUE
>
> Now...I want to cre
Hi Joe,
cbind coerces the data to be the same type. Much nicer is:
d <- data.frame(x=x, y=y, z=z)
Cheers
Andrew
On Wed, Feb 13, 2008 at 05:17:32PM -0500, Joe Trubisz wrote:
> OK...newbie question here.
> Either I'm reading the docs wrong, or I'm totally confused.
>
> Given the following:
>
On 2/13/2008 5:17 PM, Joe Trubisz wrote:
> OK...newbie question here.
> Either I'm reading the docs wrong, or I'm totally confused.
>
> Given the following:
>
> x<-c("aaa","bbb","ccc")
> y<-rep(0,3)
> z<-rep(0,3)
>
> is.character(x)
> [1] TRUE
>
> is.numeric(y)
> [1] TRUE
>
> Now...I want to c
quot;numeric" "numeric"
HTH
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Joe Trubisz
> Sent: Thursday, 14 February 2008 11:18 a.m.
> To: r-help@r-project.org
> Subject: [R] Creating a data.frame
>
&g
OK...newbie question here.
Either I'm reading the docs wrong, or I'm totally confused.
Given the following:
x<-c("aaa","bbb","ccc")
y<-rep(0,3)
z<-rep(0,3)
is.character(x)
[1] TRUE
is.numeric(y)
[1] TRUE
Now...I want to create a data frame, but keep the data types.
In reading the docs, I assum
9 matches
Mail list logo