[R] Object Browser

2012-12-02 Thread rahul143
Dear all, 

I have tried all the popular R IDE or editors like Eclipse, Komodo, JGR,
Revolution... 
They all have fancy fucntions like auto completion, syntax highlight 
BUT, I JUST WANT A OBJECT BROWSER! 

The easiest way to view objects in R console is fix(), but you have no
global view of all the objects in the workspace. 
Revolution has the best object browser so far, but this thing is way too
big... 
Eclipse all has automatically object browser, but you can't only see the
basic summary info. and it's really tricky to configure StatET. 
Jgr is very handy, when you double click the object name, you can view the
object in a spreadsheet like using fix(), but you have to press the
Refresh button each time you want to see the updated objects... 

So, is there any thing like the combination of eclipse and Jgr? 
If not, I am interested to develope something to fulfill this simple but
very important function. But right now I have no idea where to start. Any
suggestions? 


Peter 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Object-Browser-tp4651647.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Can you turn a string into a (working) symbol?

2012-12-02 Thread rahul143
Dear folks-- 

Suppose I have an expression that evaluates to a string, and that that
string, were it not a character vector, would be a symbol.  I would like a
function, call it doppel(), that will take that expression as an argument
and produce something that functions exactly like the symbol would have if I
typed it in the place of the function of the expression.  It should go as
far along the path to evaluation as the symbol would have, and then stop,
and be available for subsequent manipulation.  For example, if 

aa - 3.1416 
bb  - function(x) {x^2} 
r - 2 
xx - c(aa, bb) 

out - doppel(xx[1])*doppel(xx[2])(r) 

Then out should be 13.3664 

Or similarly, after 
doppel(paste(a,  a,  sep=''))  -  3 
aa 

typing aa should return 3. 

Is there such a function? Can there be? 

I thought as.symbol would do this, but it does not. 
 as.symbol (xx[1])*as.symbol (xx[2])(r) 
Error: attempt to apply non-function 




-





--
View this message in context: 
http://r.789695.n4.nabble.com/Can-you-turn-a-string-into-a-working-symbol-tp4651634.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Conjoint Analysis in R??

2012-12-02 Thread rahul143
Pls advise how I can use R in conjoint analysis?? 

regds 
Faisal Afzal Siddiqui 
Karachi, Pakistan 


 

 
Looking for last minute shopping deals? 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Conjoint-Analysis-in-R-tp4651650.html
Sent from the R help mailing list archive at Nabble.com.

__
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] postForm() in RCurl and library RHTMLForms

2012-12-02 Thread rahul143
Hi RUsers, 

Suppose I want to see the data on the website 
url - http://www.nseindia.com/content/indices/ind_histvalues.htm; 

for the index SP CNX NIFTY for 
dates FromDate=01-11-2010,ToDate=02-11-2010 

then read the html table from the page using readHTMLtable() 

I am using this code 
webpage - postForm(url,.params=list( 
   FromDate=01-11-2010, 
   ToDate=02-11-2010, 
   IndexType=SP CNX NIFTY, 
   Indicesdata=Get Details), 
 .opts=list(useragent = getOption(HTTPUserAgent))) 

But it doesn't give me desired result 

Also I was trying to use the function getHTMLFormDescription from the 
package RHTMLForms but there we can't use the argument 
.opts=list(useragent = getOption(HTTPUserAgent)) which is needed for this 
particular website 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/postForm-in-RCurl-and-library-RHTMLForms-tp4651655.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Stepwise analysis with fixed variables

2012-12-02 Thread rahul143
Hello,
How can I run a backward stepwise regression with part of the variables
fixed, while the others participate in the backward stepwise analysis?
Thank you



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Stepwise-analysis-with-fixed-variables-tp4651636.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Reading PDF files

2012-12-02 Thread rahul143
I need to do text mining on PDF files. I understand there is a readPDF 
command in tm that can be used. Have read the 2008 posts on converting 
PDF files to text by Tony Breyal and others. 

  

Wondering if the procedure has been standardized in any tutorial or 
otherwise? Being new to R, I was able to follow only part of the 
discussion. 

  

Any way to get a set of step by step instructions appropriate for my 
level? I am an ageing academic who has worked mostly with SAS and 
MATLAB. 

  



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Reading-PDF-files-tp4651657.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Problems with nls

2012-12-02 Thread rahul143
I'm trying to fit the Bass Diffusion Model using the nls function in R but 
I'm running into a strange problem. The model has either two or three 
parameters, depending on how it's parameterized, p (coefficient of 
innovation), q (coefficient of immitation), and sometimes m (maximum market 
share). Regardless of how I parameterize the model I get an error saying 
that the step factor has decreased below it's minimum. I have tried 
re-setting the minimum in nls.controls but that doesn't seem to fix the 
problem. Likewise, I have run through a variety of start values in the past 
few days, all to no avail. Looking at the trace output it appears that R 
believes I always have one more parameter than I actually have (i.e. when 
the model is parameterized with p and q R seems to be seeing three 
parameters, when m is also included R seems to be seeing four). My 
experience with nls is limited, can someone explain to me why it's doing 
this? I've included the data set I'm working with (published in Michalakelis 
et al. 2008) and some example code. 

## Assign relevant variables 
adoption - 
c(167000,273000,531000,938000,2056452,3894103,5932090,7963742,9314687,10469060,11393302,11976340)
 
time - seq(from = 1,to = 12, by = 1) 
## Models 
Bass.Model - adoption ~ ((p + q)^2/p) * (exp(-(p + q) * time)/((q / p) * 
exp(-(p + q) * time) + 1)^2) 
## Starting Parameters 
Bass.Params - list(p = 0.1, q = 0.1) 
## Model fitting 



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Problems-with-nls-tp4651641.html
Sent from the R help mailing list archive at Nabble.com.

__
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] postForm() in RCurl and library RHTMLForms

2012-12-02 Thread rahul143
Hi RUsers, 

Suppose I want to see the data on the website 
url - http://www.nseindia.com/content/indices/ind_histvalues.htm; 

for the index SP CNX NIFTY for 
dates FromDate=01-11-2010,ToDate=02-11-2010 

then read the html table from the page using readHTMLtable() 

I am using this code 
webpage - postForm(url,.params=list( 
   FromDate=01-11-2010, 
   ToDate=02-11-2010, 
   IndexType=SP CNX NIFTY, 
   Indicesdata=Get Details), 
 .opts=list(useragent = getOption(HTTPUserAgent))) 

But it doesn't give me desired result 

Also I was trying to use the function getHTMLFormDescription from the 
package RHTMLForms but there we can't use the argument 
.opts=list(useragent = getOption(HTTPUserAgent)) which is needed for this 
particular website 


Thanks and Regard



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/postForm-in-RCurl-and-library-RHTMLForms-tp4651644.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Sullivan, Timmerman and White 1999: TA rules, and R

2012-12-02 Thread rahul143
Friends 

I am trying to save myself some tedious work. 

I am processing a paper from  The Journal Of Finance * Vol. LIV, No. 5   
October 1999 by Sullivan,  Timmerman and  White.  Data-Snooping, 
Technical Trading Rule Performance, and the Bootstrap 

I am aiming to reproduce their results using the same  TA rules as they 
used. 

They describe the rules they use in English and I am in the process of 
trying to programme them into R.  But if some one has already done this 
it would save me a pile of work. 

It would be nice to just grab some rules from the TTR package, but 
because of the way STW describe the rules it is quite a lot of work to 
calculate what parameters to use. 

So I am clutching at a straw here:  If anybody could point me in a 
better direction than slogging through the English text and trying to 
match that with the TTR docs I would be grateful 

cheers 



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Sullivan-Timmerman-and-White-1999-TA-rules-and-R-tp4651658.html
Sent from the R help mailing list archive at Nabble.com.

__
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] e1071 SVM: Cross-validation error confusion matrix

2012-12-02 Thread rahul143
Hi, 

I ran two svm models in R e1071 package: the first without cross-validation
and the second with 10-fold cross-validation. 

I used the following syntax: 

#Model 1: Without cross-validation: 
 svm.model - svm(Response ~ ., data=data.df, type=C-classification,
 kernel=linear, cost=1) 
 predict - fitted(svm.model) 
 cm - table(predict, data.df$Response) 
 cm 

#Model2: With 10-fold cross-validation: 
 svm.model2 - svm(Response ~ ., data=data.df, type=C-classification,
 kernel=linear, cost=1, cross=10) 
 predict2 - fitted(svm.model2) 
 cm2 - table(predict2, data.df$Response) 
 cm2 

However, when I compare cm and cm2, I notice that the confusion matrices are
identical although the accuracy of each model is diffent. What am I doing
wrong? 
  
Thanks for you help, 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/e1071-SVM-Cross-validation-error-confusion-matrix-tp4651652.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Problems of metafile plots when converting word to pdf file

2012-12-02 Thread rahul143
Hi all, 

I copy metafile boxplot from R to Word. Then save as Pdf file. But I found
there are some unexpected black lines in some plots within this PDF file. 

Please give me some advice how to get rid of these black lines in PDF files. 

Thanks a lot, 

Jim 



-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Problems-of-metafile-plots-when-converting-word-to-pdf-file-tp4651659.html
Sent from the R help mailing list archive at Nabble.com.

__
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] RMySQL install on windows

2012-12-02 Thread rahul143
I have been trying to install RMySQL on Windows 7 following the 
procedure at: 
http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL

I think I have properly installed RTools and created a proper 
Renviron.site file saying: 
MYSQL_HOME=C:/Program Files/MySQL/MySQL Server 5.5 

When I try to install the packages from source, I get warnings that 
suggest I'm still not quite with the program yet. There are comments 
about POSIX paths that I don't quite grasp. Can anyone give me 
additional hints? 

There seems to be a libmysql.dll in the /lib subdirectory although the 
install seems to be looking in the /bin directory for a file of similar 
name. Is this something that has changed with recent versions of MySQL 
that should be fixed in the RMySQL package or is it something I can work 
around by hand or by properly setting some environmental variable? 

Thanks, 




-




--
View this message in context: 
http://r.789695.n4.nabble.com/RMySQL-install-on-windows-tp4651660.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Object Browser

2012-12-02 Thread rahul143
What's the best object browser? 

Dear all, 

I have tried all the popular R IDE or editors like Eclipse, Komodo, JGR,
Revolution... 
They all have fancy fucntions like auto completion, syntax highlight 
BUT, I JUST WANT A OBJECT BROWSER! 

The easiest way to view objects in R console is fix(), but you have no
global view of all the objects in the workspace. 
Revolution has the best object browser so far, but this thing is way too
big... 
Eclipse all has automatically object browser, but you can't only see the
basic summary info. and it's really tricky to configure StatET. 
Jgr is very handy, when you double click the object name, you can view the
object in a spreadsheet like using fix(), but you have to press the
Refresh button each time you want to see the updated objects... 

So, is there any thing like the combination of eclipse and Jgr? 
If not, I am interested to develope something to fulfill this simple but
very important function. But right now I have no idea where to start. Any
suggestions? 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Object-Browser-tp4651654.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Linking C/C++ GUI to R.dll

2012-12-02 Thread rahul143
Hi, 

I am in the process of linking a C/C++ application to the R.dll 
directly.  I have obtained the R source code and compiled it 
successfully.  I have also successfully linked the R.dll directly into 
our application and have made calls successfully into the R.dll that are 
included in the sample rtest.c and in the Writing R Extensions - The R 
API.   

The R functionality that we are interested in embedding into our 
application is the data analysis and graphics.  However, I did not see 
any references to this in the R API section of the documentation.  Is 
this functionality available from our C/C++ application via the R.dll? 
If so, how do we access this functionality? 

Thank you, 



-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Linking-C-C-GUI-to-R-dll-tp4651661.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Sullivan, Timmerman and White 1999: TA rules, and R

2012-12-02 Thread rahul143
Friends 

I am trying to save myself some tedious work. 

I am processing a paper from  The Journal Of Finance * Vol. LIV, No. 5   
October 1999 by Sullivan,  Timmerman and  White.  Data-Snooping, 
Technical Trading Rule Performance, and the Bootstrap 

I am aiming to reproduce their results using the same  TA rules as they 
used. 

They describe the rules they use in English and I am in the process of 
trying to programme them into R.  But if some one has already done this 
it would save me a pile of work. 

It would be nice to just grab some rules from the TTR package, but 
because of the way STW describe the rules it is quite a lot of work to 
calculate what parameters to use. 

So I am clutching at a straw here:  If anybody could point me in a 
better direction than slogging through the English text and trying to 
match that with the TTR docs I would be grateful 




-
TO GET MORE DETAILS CLICK HERE  
--
View this message in context: 
http://r.789695.n4.nabble.com/Sullivan-Timmerman-and-White-1999-TA-rules-and-R-tp4651656.html
Sent from the R help mailing list archive at Nabble.com.

__
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] residual and null deviance of an lme object with correlation structure

2012-12-02 Thread rahul143
Hello, 

I am attempting to calculate the residual and null deviance of an lme 
object that includes a corAR1 correlation structure. I tried 
deviance(lme.object) and it only returned NULL. Can anyone help? Thank 
you. 



-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/residual-and-null-deviance-of-an-lme-object-with-correlation-structure-tp4651662.html
Sent from the R help mailing list archive at Nabble.com.

__
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] finding index of maximum value in vector

2012-12-02 Thread rahul143
I found: 
  max.col(matrix(c(1,3,2),nrow=1)) 
Is there a more concise/elegant way? 
Thanks, 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/finding-index-of-maximum-value-in-vector-tp4651663.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Fitting binomial lmer-model, high deviance and low logLik

2012-12-02 Thread rahul143
Hello 

I have a problem when fitting a mixed generalised linear model with the 
lmer-function in the Matrix package, version 0.98-7. I have a respons 
variable (sfox) that is 1 or 0, whether a roe deer fawn is killed or not 
by red fox. This is expected to be related to e.g. the density of red 
fox (roefoxratio) or other variables. In addition, we account for family 
effects by adding the mother (fam) of the fawns as random factor. I want 
to use AIC to select the best model (if no other model selection 
criterias are suggested). 

the syntax looks like this: 
  mod - lmer(sfox ~ roefoxratio + (1|fam), data=manu2, family=binomial) 

The output looks ok, except that the deviance is extremely high 
(1.798e+308). 

  mod 
Generalized linear mixed model fit using PQL 
Formula: sfox ~ roefoxratio + (1 | fam) 
Data: manu2 
  Family: binomial(logit link) 
AIC   BIC logLik  deviance 
  1.797693e+308 1.797693e+308 -8.988466e+307 1.797693e+308 
Random effects: 
  GroupsNameVarianceStd.Dev. 
 fam (Intercept)  17.149  4.1412 
# of obs: 128, groups: fam, 58 

Estimated scale (compare to 1)  0.5940245 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Fitting-binomial-lmer-model-high-deviance-and-low-logLik-tp4651668.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Hmisc latex cell background color

2012-12-02 Thread rahul143
Dear latex/R-Sweavers, 

Using the codel below, I can color text in individual cells for latex 
output. 
Is there a similar way to get a background shading? My attempts failed 
because I did not get the closing brace at the right place with Hmisc/latex. 

library(Hmisc) 

x - as.data.frame(diag(rnorm(3),nrow=3)) 
cellTex - matrix(rep(, NROW(x) * NCOL(x)), nrow=NROW(x)) 
cellTex[2,2] - \color{red} 
ct - latex(x, cellTexCmds = cellTex,numeric.dollar=FALSE) 
ct$style - color 
dvi(ct) 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Hmisc-latex-cell-background-color-tp4651664.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Kalman Filter Forecast using 'SSPIR'

2012-12-02 Thread rahul143
Dear R Users, 

  

  I am new to state-space modeling. I am using SSPIR 
package for Kalman Filter. I have a data set containing one dependent 
variable and 7 independent variables with 250 data points. I want to use 
Kalman Filter for forecast the future values of the dependent variable 
using a multiple regression framework. I have used ssm function to 
produce the state space (SS) object, but I am bit confused that how can 
I predict the future values. 

  

Thanks a lot in advance. 

  



-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Kalman-Filter-Forecast-using-SSPIR-tp4651666.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Fitting binomial lmer-model, high deviance and low logLik

2012-12-02 Thread rahul143
Hello 

I have a problem when fitting a mixed generalised linear model with the 
lmer-function in the Matrix package, version 0.98-7. I have a respons 
variable (sfox) that is 1 or 0, whether a roe deer fawn is killed or not 
by red fox. This is expected to be related to e.g. the density of red 
fox (roefoxratio) or other variables. In addition, we account for family 
effects by adding the mother (fam) of the fawns as random factor. I want 
to use AIC to select the best model (if no other model selection 
criterias are suggested). 

the syntax looks like this: 
  mod - lmer(sfox ~ roefoxratio + (1|fam), data=manu2, family=binomial) 

The output looks ok, except that the deviance is extremely high 
(1.798e+308). 

  mod 
Generalized linear mixed model fit using PQL 
Formula: sfox ~ roefoxratio + (1 | fam) 
Data: manu2 
  Family: binomial(logit link) 
AIC   BIC logLik  deviance 
  1.797693e+308 1.797693e+308 -8.988466e+307 1.797693e+308 
Random effects: 
  GroupsNameVarianceStd.Dev. 
 fam (Intercept)  17.149  4.1412 
# of obs: 128, groups: fam, 58 

Estimated scale (compare to 1)  0.5940245 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Fitting-binomial-lmer-model-high-deviance-and-low-logLik-tp4651669.html
Sent from the R help mailing list archive at Nabble.com.

__
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] How to simulate correlated data

2012-12-02 Thread rahul143
Hello there, 

I would like to simulate X --Normal (20, 5) 
 Y-- Normal (40, 10) 

and the correlation between X and Y is 0.6. How do I do it in R? 

Thank you very much 



-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-simulate-correlated-data-tp4651667.html
Sent from the R help mailing list archive at Nabble.com.

__
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] concatenating expressions and standard text

2012-12-02 Thread rahul143
Hi all, 

is it possible to concatenate expressions and basic text when for 
instance labeling axis of a plot? I would like to see something like the 
concatenation of expression(C[0]) and for case 1 on my x axis. 
Obviously a plot(x, y, xlab=paste(expression(C[0]), in case1)) will 
not work. 

Thank you in advance, 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/concatenating-expressions-and-standard-text-tp4651670.html
Sent from the R help mailing list archive at Nabble.com.

__
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] superimpose density line over hist

2012-12-02 Thread rahul143
 Romain == Romain Francois [hidden email] 
 on Tue, 13 Dec 2005 15:40:59 +0100 writes: 

   

Romain A few comments : 
Romain - your code should be reproductible, otherwise it is useless.
(that 
Romain recommandation is on the posting guide) 

Romain - that question is a top ten question on that list, go to the
archive 
Romain and you will find answers. (also posting guide) 
Romain BTW, it should be a FAQ and what about an example of overlaying
in hist 
Romain help page ? 

What about the following one --- do also note the comments though! 

set.seed(14) 
x - rchisq(100, df = 4) 

## Comparing data with a model distribution should be done with qqplot()! 
qqplot(x, qchisq(ppoints(x), df = 4)); abline(0,1, col = 2, lty = 2) 

## if you really insist on using hist() ... : 
hist(x, prob = TRUE, ylim = c(0, 0.2)) 
curve(dchisq(x, df = 4), col = 2, lty = 2, lwd = 2, add = TRUE) 




-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Re-superimpose-density-line-over-hist-tp4651671.html
Sent from the R help mailing list archive at Nabble.com.

__
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] Labeling a range of bars in barplot?

2012-12-02 Thread rahul143
Marc Schwartz (via MN) wrote:

 On Tue, 2005-12-13 at 10:53 +, Dan Bolser wrote: 
 
Hi, I am plotting a distribution of (ordered) values as a barplot. I 
would like to label groups of bars together to highlight aspects of the 
distribution. The label for the group should be the range of values in 
those bars. 
 
As this is hard to describe, here is an example; 
 



-
   TO GET MORE DETAILS CLICK HERE  





--
View this message in context: 
http://r.789695.n4.nabble.com/Re-Labeling-a-range-of-bars-in-barplot-tp4651672.html
Sent from the R help mailing list archive at Nabble.com.

__
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.