[R] How to write a regression model for finding the radius of a cylinder given height and volume
David Carlson
dcarlson at tamu.edu
Tue Feb 11 15:22:00 CET 2014
?colnames
> a <- matrix(sample.int(10), 5, 2)
> str(a)
int [1:5, 1:2] 10 1 8 6 4 2 7 9 3 5
> colnames(a)
NULL
> colnames(a) <- c("volume", "height")
> colnames(a)
[1] "volume" "height"
> a
volume height
[1,] 10 2
[2,] 1 7
[3,] 8 9
[4,] 6 3
[5,] 4 5
David C
-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of nivek
Sent: Tuesday, February 11, 2014 12:06 AM
To: r-help at r-project.org
Subject: Re: [R] How to write a regression model for finding the
radius of a cylinder given height and volume
Thank you for your help. This is not homework however and my
difficulty is in
the fact that i cannot figure out how the declare a variable for
the height
or the volume given a data set where the matrix is already
formed. I have
looked on many sites for the is answer and it seems like it
would be an easy
one. So for this problem the provided data column 2 is the
height data and
column 1 is the volume. What command do I use to read those
values and form
a vector. Thank you for your time.
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-write-a-regression-model-fo
r-finding-the-radius-of-a-cylinder-given-height-and-volume-tp468
5033p4685090.html
Sent from the R help mailing list archive at Nabble.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.
More information about the R-help
mailing list