Re: [R] Reading PDF files

2012-12-03 Thread jose romero
Hello: Apart from readPDF in the tm package, you can use the pdf to text converter command in linux, which is pdftotext.  Say file.pdf is your file, from R you'd use: system(pdftotext file.pdf -layout) This invokes the pdftotext command from within R and creates a file called file.txt with

[R] plots for residual analysis

2012-01-06 Thread jose romero
Hello List: I'm writing in R some code to produce plots for residual analysis and diagnostics in linear regressions.  An example of the plots produced is given for downloading at http://dl.dropbox.com/u/25445316/res_plots.png .  Regarding the example plot, I'd like to point out that: 1)

[R] problem with switch function across R versions 2.10 and 2.13

2011-09-27 Thread jose romero
Hello, The following piece of code works fine in R.2.10 (ubuntu): switch(distr,         normal    = {if (is.infinite(param[desv]))                 n - c(n,La desv. estándar no puede ser Inf.)                    if (param[desv]0)                 n - c(n,La desv. estándar no puede ser

[R] loading R object files on an RWeb server

2011-04-03 Thread jose romero
be read in by the load() command? 2) is there a correct procedure for all this that can be used when working with Rweb? Packages are not the way to go as it seems one cannot install a package on an RWeb server! Thanks in advance, jose romero [[alternative HTML version deleted

[R] Sweave and object of type 'closure' is not subsettable error

2010-03-19 Thread jose romero
Hello folks: I have a data frame which includes two numeric vectors: Pa1 and Ingr (which represents income).  I run the following code on the R console: ingreso - factor(ifelse(Ingr=3000,bajo,alto)) tapply(Pa1,ingreso,summary) boxplot(Pa1~ingreso) and it works fine.  However, when I Sweave

[R] summary statistics for grouped data

2010-02-12 Thread jose romero
was looking for a single function that could do that with a data vector. Thanks in advance, jose romero [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] getting input from the console when running R in batch mode

2010-02-10 Thread jose romero
data from a file or using the tcltk library?  All i'd like to do is just read values from the terminal/console. Thanks in advance, jose romero [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Interpretation of plots in linear regression models (verification of Gauss-Markov hypothesis)

2009-11-25 Thread jose romero
Hello R Gurus: I'm doing a simple linear regression model: modelo1 - lm(X9 ~ 1 + X1 + I(log(X2)) + X3 + I(log(X4)) + X5 + I(log(X6)) + X7) of which i later do a plot: plot(modelo1) This shows 4 graphics, about which I ask: 1) In the Residuals vs. Fitted, what does the red curve represent? 2)

[R] Obtaining midpoints of class intervals produced by cut and table

2009-11-08 Thread jose romero
Hello list: I am using cut and table to obtain a frequency table from a numeric sample vector.  The idea is to calculate mean and standard deviation on grouped data.  However, I can't extract the midpoints of the class intervals, which seem to be strings treated as factors.  How do i extract

[R] how to verify gauss-markov hypothesis for linear model validity?

2009-06-16 Thread jose romero
Hello list: (This is probably a stupid question).  Is there a quick and easy way to confirm the gauss-markov conditions of a linear multiple regression model?  That the mean of the residuals is 0 can easily be tested for. The normality of the residuals as well (shapiro-wilk?).  But what about

[R] goodness of fit between two samples of size N (discrete variable)

2009-04-12 Thread jose romero
Hello list: I generate by simulation (using different procedures) two sample vectors of size N, each corresponding to a discrete variable and I want to text if these samples can be considered as having the same probability distribution (which is unknown). What is the best test for that?

Re: [R] How to model this? (R-help Digest, Vol 67, Issue 25)

2008-10-06 Thread jose romero
Hello Senne: I am currently teaching a simulation and modeling course in which we use R for most purposes and Sim Py (a python module for discrete event simulation). I am looking for a real-life case such as yours to approach in class- if you wish, i would be happy to look into the case you

[R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread jose romero
in 0,1,..,44. I have tried Vectorize to no avail. Thanks in advance, jose romero __ 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

Re: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero)

2008-08-27 Thread jose romero
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jose romero Sent: Wednesday, August 27, 2008 10:24 AM To: r-help@r-project.org Subject: [R] Integrate a 1-variable function with 1 parameter (Jose L. Romero

[R] Vectorization of duration of the game in the gambler ruin's problem

2008-08-14 Thread jose romero
Hey fellas: In the context of the gambler's ruin problem, the following R code obtains the mean duration of the game, in turns: # total.capital is a constant, an arbitrary positive integer # initial.capital is a constant, an arbitrary positive integer between, and not including # 0 and