[R] interactive 3d plot (identifying datapoint when clicked or mouse-overed)

2010-03-16 Thread June Kim
Is there a package that provides interactive 3d scatter plot with the
functionality of identifying the datapoint when clicked or
mouse-overed? Or, if not, which package is the best alternative (with
some modification) to produce the similar effect?

If there is a rotation feature, it is +1.

__
R-help@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.


[R] stem's scale

2009-05-01 Thread June Kim
What is the model behind stem's scale? How the number of bins are
determined? In the following example session, scale=1 and scale=2 has
the same result.

 stem(c(11,21,31),scale=2)

  The decimal point is 1 digit(s) to the right of the |

  1 | 1
  1 |
  2 | 1
  2 |
  3 | 1

 stem(c(11,21,31),scale=1)

  The decimal point is 1 digit(s) to the right of the |

  1 | 1
  1 |
  2 | 1
  2 |
  3 | 1

__
R-help@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.


[R] a few scatter plots for a specific correlation value

2009-03-05 Thread June Kim
Hello,

Is there a simple way to draw a few random sample scatter plots from a
given specific correlation coefficient(say, 0.18)?

__
R-help@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.


[R] warning : increasing the PDF version to 1.3

2008-11-15 Thread June Kim
What does the warning mean?

In dev.off() : increasing the PDF version to 1.3

__
R-help@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.


[R] metaprogramming with lm

2008-11-12 Thread June Kim
Hello,

Say I want to make a multiple regression model with the following expression:

lm(y~x1 + x2 + x3 + ... + x_n,data=mydata)

It gets boring to type in the whole independent variables, in this
case x_i. Is there any simple way to do the metaprogramming for this?
(There are different cases where the names of the independent
variables might sometimes have apparent patterns or not)

__
R-help@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.


[R] turning comma separated string from multiple choices into flags

2008-09-29 Thread June Kim
Hello,

I use google docs' Forms to conduct surveys online. Multiple choices
questions are coded as comma separated values.

For example,

if the question is like:

1. What magazines do you currently subscribe to? (you can choose
multiple choices)
1) Fast Company
2) Havard Business Review
3) Business Week
4) The Economist

And if the subject chose 1) and 3), the data is coded as a cell in a
spreadsheet as,

Fast Company, Business Week

I read the data with read.csv into R. To analyze the data, I have to
change that string into something like flags(indicator variables?).
That is, there should be 4 variables, of which values are either 1 or
0, indicating chosen or not-chosen respectively.

Suppose the data is something like,

 survey1
  agefavorite_magazine
1  29 Fast Company
2  31  Fast Company, Business Week
3  32 Havard Business Review, Business Week, The Economist


Then I have to chop the string in favorite_magazine column to turn
that data into something like,

 survey1transformed
  age Fast Company Havard Business Review Business Week The Economist
1  291  0 0 0
2  311  0 1 0
3  320  1 1 1


Actually I have many more multiple choice questions in the survey.

What is the easy elegant and natural way in R to do the job?

__
R-help@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.


Re: [R] turning comma separated string from multiple choices into flags

2008-09-29 Thread June Kim
Thank you. The misspelling of Harvard wasn't intended. The data are
spelled consistently.

2008/9/30 Peter Dalgaard [EMAIL PROTECTED]:
 June Kim wrote:
 Hello,

 I use google docs' Forms to conduct surveys online. Multiple choices
 questions are coded as comma separated values.

 For example,

 if the question is like:

 1. What magazines do you currently subscribe to? (you can choose
 multiple choices)
 1) Fast Company
 2) Havard Business Review
 3) Business Week
 4) The Economist

 And if the subject chose 1) and 3), the data is coded as a cell in a
 spreadsheet as,

 Fast Company, Business Week

 I read the data with read.csv into R. To analyze the data, I have to
 change that string into something like flags(indicator variables?).
 That is, there should be 4 variables, of which values are either 1 or
 0, indicating chosen or not-chosen respectively.

 Suppose the data is something like,


 survey1

   agefavorite_magazine
 1  29 Fast Company
 2  31  Fast Company, Business Week
 3  32 Havard Business Review, Business Week, The Economist


 Then I have to chop the string in favorite_magazine column to turn
 that data into something like,


 survey1transformed

   age Fast Company Havard Business Review Business Week The Economist
 1  291  0 0 0
 2  311  0 1 0
 3  320  1 1 1


 Actually I have many more multiple choice questions in the survey.

 What is the easy elegant and natural way in R to do the job?


 I'd look into something like as.data.frame(lapply(strings, grep,
 x=favorite_magazine, fixed=TRUE)), where strings - c(Fast Company,
 Havard Business Review, ...).

 (I take it that the mechanism is such that you can rely on at least
 having everything misspelled in the same way? If it is alternatingly
 Havard and Harvard, then things get a bit trickier.)

 --
   O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
 ~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907



__
R-help@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.


Re: [R] best material for programmers?

2008-09-28 Thread June Kim
Thanks for the reply, but RCurl looks like an interface to curl, which
might be useful but it's not what I'm looking for. I am looking for a
text to learn R.

2008/9/28 Ajay ohri [EMAIL PROTECTED]:
 someone mentioned the RCurl package recently

 On Sun, Sep 28, 2008 at 9:12 AM, June Kim [EMAIL PROTECTED] wrote:

 Hello,

 What is the best material(book, pdfs, ...) for programmers, who have
 extensive experience in other programming languages, to learn R
 programming? I think there are many materials on how to use R for
 specific statistical jobs, but I haven't seen any material
 particularly designed for R programming.

 Thanks.

 __
 R-help@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.



 --
 Regards,

 Ajay Ohri
 http://tinyurl.com/liajayohri




__
R-help@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.


[R] best material for programmers?

2008-09-27 Thread June Kim
Hello,

What is the best material(book, pdfs, ...) for programmers, who have
extensive experience in other programming languages, to learn R
programming? I think there are many materials on how to use R for
specific statistical jobs, but I haven't seen any material
particularly designed for R programming.

Thanks.

__
R-help@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.


[R] brushing with parallel coordinates

2008-09-13 Thread June Kim
Hello,

I have a multivariate data with a single Y variable and 9 X variables.
I tried drawing a parallel coordinates with the data set without a
problem, using lattice library. However, I want to do some brushing on
the graph. For example, I want to distinguish the group of data lines
of which Y values are bigger than 0.5. It could be through
coloring(red line, maybe).

Have a look at the brushing facility provided with another tool:

http://www.rebeccashapley.com/assignments/is247/images/xmdvbrush_.jpg

Can I do the job easily with lattice? Or should I change the tool?

__
R-help@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.