[R] closeness of codes

2011-09-18 Thread Henri-Paul Indiogine
Greetings! I am using the R library RQDA to assign certain codes to paragraphs of documents in a collection. Several paragraphs are assigned more than 1 code. E.g. often the codes "poverty" and "education" will be assigned to the same paragraph. Often also "math" and "career" will be given to

[R] PERL client example for RServ

2011-09-18 Thread lgupta1
Does anyone have a PERL client example that sends a command to a running RServ instance and displays the output on the client side? Regards Lokesh -- View this message in context: http://r.789695.n4.nabble.com/PERL-client-example-for-RServ-tp3823032p3823032.html Sent from the R help mailing lis

Re: [R] regression summary results pvalues and coefficients into a excel

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 9:36 PM, Donald Price wrote: Hi All, I have run many regression analyses (14000 +) and want to collect the coefficients and pvalues into an excel file. I can get the statements below to work up to step 4. I can printout the regressionresults (sample output below).

[R] regression summary results pvalues and coefficients into a excel

2011-09-18 Thread Donald Price
Hi All, I have run many regression analyses (14000 +) and want to collect the coefficients and pvalues into an excel file. I can get the statements below to work up to step 4. I can printout the regressionresults (sample output below). So my hope is to run something like step 5 and 6 and put th

Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Cool! Don showed me another trick--use (n= ) in Identify. The active window will come back to console after the specified amount of clicks, you will be able to execute more commands in console. Thank you! Quoting Duncan Murdoch : On 11-09-18 5:15 PM, bby2...@columbia.edu wrote: Don and Du

[R] Linear regression interaction terms

2011-09-18 Thread Andrey A
Hello I performed a linear regression, my equation is Y = âo+ â1A + â2B + â3AB. Is there a way to separate interaction terms, say â3AB and plot it against a certain variable? Thanks, Andrew [[alternative HTML version deleted]] __ R-help@r-projec

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch
On 11-09-18 5:15 PM, bby2...@columbia.edu wrote: Don and Duncan, That function works, up to the same point where I can save pdf into Word using the menu. But when I use Identify function together with plot function, the Quartz window has to be closed before I can go back the console to execute "

[R] perm.test()

2011-09-18 Thread song_gpqg
Hi! I am doing a two sample permutation test and trying to find confidence interval. perm.test() seems can do that but when the vector contains negative numbers it occurs an error. And for perm.test(x,y), elements in x can't be more than in y. I am wondering how I can fix these two problems? Thanks

Re: [R] Add png image outside plot borders

2011-09-18 Thread Joshua Wiley
Great, thanks Amelia. Here is what I would do: require(png) require(grid) ## select the PNG file z <- readPNG(file.choose()) ## Function to draw your statement copyright.draw <- function(label, image, x, y, size, ...) { lab <- textGrob(label = label, x = unit(x, "npc"), y = unit(y, "npc")

Re: [R] Add png image outside plot borders

2011-09-18 Thread baptiste auguie
Hi, if your logo is in vector format you should probably try the grImport package; see its vignette for examples, also below, library(grImport) ## http://creativecommons.org/about/downloads/ PostScriptTrace("cc.logo.eps") cc <- readPicture("cc.logo.eps.xml") logo <- pictureGrob(cc[16:18], x=un

Re: [R] AIC

2011-09-18 Thread B77S
This isn't a question about R; more appropriate for stackexchange. Here is one string that might interest you: http://stats.stackexchange.com/questions/4997/can-aic-compare-across-different-types-of-model Tania Sav wrote: > > Hello, > > I'm using AIC() to choose a better model. I have 3 o

Re: [R] Add png image outside plot borders

2011-09-18 Thread Duncan Temple Lang
Amelia You can persuade rasterImage() (and other functions) to draw outside of the data region using xpd = NA or xpd = TRUE. See the help for the par function. D. On 9/18/11 1:59 PM, Amelia McNamara wrote: > If you run this, you'll see that I have some text at the bottom, but > the logo i

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
Sorry -- you do have to highlight the quartz window to use identify(), but that shouldn't matter either. On Sep 18, 2011, at 2:41 PM, Don McKenzie wrote: > > On Sep 18, 2011, at 2:15 PM, bby2...@columbia.edu wrote: > >> Don and Duncan, >> >> That function works, up to the same point where I c

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
On Sep 18, 2011, at 2:15 PM, bby2...@columbia.edu wrote: > Don and Duncan, > > That function works, up to the same point where I can save pdf into Word > using the menu. But when I use Identify function together with plot function, > the Quartz window has to be closed before I can go back the

Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Don and Duncan, That function works, up to the same point where I can save pdf into Word using the menu. But when I use Identify function together with plot function, the Quartz window has to be closed before I can go back the console to execute "copy2eps" function. But by then, I don't hav

[R] randomForest2Rules

2011-09-18 Thread saskay
Hi, I'm trying to extract the rules from every tree in the random forest model that I've created. I've used randomForest2Rules function from "rattle" package however I get an error "Error in if (var.class == "character" | var.class == "factor") { : argument is of length zero" Sample code: libr

Re: [R] Add png image outside plot borders

2011-09-18 Thread Amelia McNamara
If you run this, you'll see that I have some text at the bottom, but the logo is within the plot borders. plot(c(1.1, 2.3, 4.6), c(2.0, 1.6, 3.2), ylab="", xlab="") mtext("X axis label", side=1, line=3) mtext("Copyright statement", side=1, line=4, adj=0, cex=0.7) library(png) z <- readPNG("Cc.logo

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch
On 11-09-18 4:53 PM, Don McKenzie wrote: I think it's actually dev.copy2eps() or at least that one works. Right, sorry. Duncan Murdoch On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote: On 11-09-18 4:11 PM, bby2...@columbia.edu wrote: Yes, I'm positive I had the right window highlighted,

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
I think it's actually dev.copy2eps() or at least that one works. On 18-Sep-11, at 1:51 PM, Duncan Murdoch wrote: On 11-09-18 4:11 PM, bby2...@columbia.edu wrote: Yes, I'm positive I had the right window highlighted, and I have shown this problem to lots of people including tech staff, to g

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch
On 11-09-18 4:11 PM, bby2...@columbia.edu wrote: Yes, I'm positive I had the right window highlighted, and I have shown this problem to lots of people including tech staff, to get no answers. So I suspect it's probably a somewhat obscure problem. Duncan, thanks for the lead on the new group. I w

Re: [R] Add png image outside plot borders

2011-09-18 Thread Joshua Wiley
Hi Amelia, Can you give an example (using text where you want the CC is fine)? Two angles I would try would be A) changing the regions or related but more flexible (and hence complex) B) use grid of course if you're making these with, say, ggplot2, you're already in grid (but then mtext probably w

[R] Add png image outside plot borders

2011-09-18 Thread Amelia McNamara
I am trying to add a copyright disclaimer outside the plot borders of some images I have created. I can use mtext() to add the written portion, but I would like to have the Creative Commons license image (http://en.wikipedia.org/wiki/File:Cc.logo.circle.svg) before the text. I've found that I can p

Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Yes, I'm positive I had the right window highlighted, and I have shown this problem to lots of people including tech staff, to get no answers. So I suspect it's probably a somewhat obscure problem. Duncan, thanks for the lead on the new group. I will follow up on that. What is the copy2eps?

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
On 18-Sep-11, at 12:59 PM, Duncan Murdoch wrote: On 11-09-18 3:48 PM, Don McKenzie wrote: On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote: This is has been bugging me for a long time. Nobody around me seems to have this problem. I hope someone on the forum could help me. When I gener

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Duncan Murdoch
On 11-09-18 3:48 PM, Don McKenzie wrote: On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote: This is has been bugging me for a long time. Nobody around me seems to have this problem. I hope someone on the forum could help me. When I generate a R graph and want to bring the image into Word.

Re: [R] graph bugs using R on MAC

2011-09-18 Thread B77S
Have you been shown how to save a graph as a JPEG or PNG? try this: png("myGraph.png") plot(your_data) dev.off() A png will appear in your working directory, which can be imported into the Word document. You can do the same with a JPEG see ?jpeg or ?png and ?dev.off HTH bonnieyuan wrote: >

Re: [R] graph bugs using R on MAC

2011-09-18 Thread bby2103
Copy paste doesn't work. So I tried to Select and then copy paste, but it doesn't work either. Quoting Don McKenzie : On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote: This is has been bugging me for a long time. Nobody around me seems to have this problem. I hope someone on the for

Re: [R] graph bugs using R on MAC

2011-09-18 Thread Don McKenzie
On 18-Sep-11, at 12:38 PM, bby2...@columbia.edu wrote: This is has been bugging me for a long time. Nobody around me seems to have this problem. I hope someone on the forum could help me. When I generate a R graph and want to bring the image into Word. I cannot copy and paste it like many

[R] graph bugs using R on MAC

2011-09-18 Thread bby2103
This is has been bugging me for a long time. Nobody around me seems to have this problem. I hope someone on the forum could help me. When I generate a R graph and want to bring the image into Word. I cannot copy and paste it like many of my classmates can do. The "Select" in Edit menu have

Re: [R] R-Help

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 2:25 PM, Gastón wrote: Hi, my name is Gastón. I just read a question, made by Walter Durka, about a nonparametric discriminant analysis. It wasn´t any answer, and I was wondering if at this moment there is one. I have the same problem as W. Durka. I´m trying to classif

Re: [R] Referring to an object by a variable containing its name: 6 failures

2011-09-18 Thread andrewH
Thanks Josh & Duncan! That was very clear and helpful. After going back and reviewing documentation for "{" and "$" I am realizing that R the pattern in R documentation is simply to tell you the truth, and not to give much effort to distinguishing confusable choices. Once again, things that seemed

Re: [R] troubles with a for loop

2011-09-18 Thread Francesco Sarracino
Wow, thanks a lot for your quick replies and useful comments. Indeed, Sarah's advice does the job perfectly. I wish to thank you all also for your advices on how to shift from a Stata mindset to an R one (which is currently my main obstacle). Best, f. On 18 September 2011 20:07, R. Michael Weylan

Re: [R] Could R run Cox proportional hazard model with multiple failure time data

2011-09-18 Thread Frank Harrell
You sent that question to me individually as well as posting to the group. Kindly pick the most appropriate place and send to only that. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Could-R-run-Cox-pro

Re: [R] troubles with a for loop

2011-09-18 Thread Jorge I Velez
Why wouldn't? It does for me ;-) curve(sin(x), 0, 10, col = 4, lwd = 2, las = 1) curve(cos(x), 0, 10, add = TRUE) Best, Jorge On Sun, Sep 18, 2011 at 2:07 PM, R. Michael Weylandt <> wrote: > Furthermore, if you want to add lines to a plot, I'd advise against the > curve() function, rather use

Re: [R] R-Help

2011-09-18 Thread Bert Gunter
Gaston: There are many ways to do this, but I think this is mostly a question about statistics, not about R. Once you have decided *what* you want to do, then you can search in R for tools to do it. So I would suggest you post your question on a statistics site, like http://stats.stackexchange.com

[R] R-Help

2011-09-18 Thread Gastón
Hi, my name is Gastón. I just read a question, made by Walter Durka, about a nonparametric discriminant analysis. It wasn´t any answer, and I was wondering if at this moment there is one. I have the same problem as W. Durka. I´m trying to classify and to cross-validate samples of three tunicates s

Re: [R] Extracting a a chunk of text from a pdf file

2011-09-18 Thread Victor
That's exactly the way I work. Here you are a chunk of text of my script. To put it in a nutshell I'm already extracting - by means of grep and gsub from indweb (luckily an html file) - the web addresses like http://www.terna.it/LinkClick.aspx?fileticket=TTQuOPUf%2fs0%3d&tabid=435&mid=3072

Re: [R] calculating VAR of a (Gumbel) copula

2011-09-18 Thread Ivette
Yes, David, you are right - I have misinterpreted the result. The.pdf is the exact output and the algorithm is working. Many thanks! Ivette -- View this message in context: http://r.789695.n4.nabble.com/calculating-VAR-of-a-Gumbel-copula-tp3821566p3822196.html Sent from the R help mailing list

Re: [R] troubles with a for loop

2011-09-18 Thread R. Michael Weylandt
Furthermore, if you want to add lines to a plot, I'd advise against the curve() function, rather use lines() to add lines (or points() for, well, points) on a plot. E.g., x <- seq(0,10,by=0.025) y <- sin(x) y2 <- cos(x) plot(x,y,type="l",col="red4",lwd=3) lines(x,y2) curve() wouldn't work for t

Re: [R] troubles with a for loop

2011-09-18 Thread Patrick Burns
Sarah has told you how to get from where you are to where you want to be. However, it is easier to start somewhere else. The more "R" way to do what you are doing is to use a list to put the results of your regressions into. It is then very easy to use that list, and it is easier to keep track

Re: [R] Tobit Fixed Effects

2011-09-18 Thread Felipe Nunes
Thanks! *Felipe Nunes* CAPES/Fulbright Fellow PhD Student Political Science - UCLA Web: felipenunes.bol.ucla.edu On Sun, Sep 18, 2011 at 2:19 AM, Arne Henningsen < arne.henning...@googlemail.com> wrote: > Hi Felipe > > On 18 September 2011 09:09, Felipe Nunes wrote: > > Thanks, Arne! > > But

Re: [R] troubles with a for loop

2011-09-18 Thread Sarah Goslee
You don't have a variable named pd.memb.i Instead, you need something like: get(paste("pd.memb.", i, sep="")) The error message you're getting, though, is because your loop syntax is wrong: for(i in 1:3) { do something } Sarah On Sun, Sep 18, 2011 at 12:05 PM, Francesco Sarracino wrote: > Dea

Re: [R] Extracting a a chunk of text from a pdf file

2011-09-18 Thread Joshua Wiley
On Sun, Sep 18, 2011 at 7:44 AM, Victor wrote: > Unfortunately pdf2text doesn't seem to exist either in linux or mac osx. I think Jeff's main point was to search for software specific for your task (convert a pdf to text). Formatting will be lost so once you get your text files, I would look at

[R] troubles with a for loop

2011-09-18 Thread Francesco Sarracino
Dear all, I am a stata user and I am moving my first steps in R. I am dealing with a silly issue concerning looping over variables. I read previous posts on similar topics in the R help archive, but I did not find a solution. Here is my case: I run a simple bivariate linear regression saving the

Re: [R] Extracting a a chunk of text from a pdf file

2011-09-18 Thread Victor
Unfortunately pdf2text doesn't seem to exist either in linux or mac osx. Ciao Vittorio Il giorno 17/set/2011, alle ore 21:00, Jeff Newmiller ha scritto: > Doesn't seen like an R task, but see pdf2text? (From pdftools, UNIX command > line tools) > -

Re: [R] Replacing matching values by related values

2011-09-18 Thread Justin Haynes
in your assignment for t3 you use nt which is undefined. thus t.n$treatment is NAs but: df<-data.frame(num=1:10,let=letters[1:10]) dat<-data.frame(let=sample(letters[1:10],20,replace=T)) dat$matched<-df$num[match(dat$let,df$let)] should get you started On Sun, Sep 18, 2011 at 7:56 AM, Jansse

Re: [R] Removing a single element from an array

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 11:10 AM, David Winsemius wrote: On Sep 18, 2011, at 10:47 AM, Dennis Fisher wrote: R 2.13.1 OS X Colleagues I frequently encounter a situation in which I want to remove a single element of an array. For example, if I am reading in a bunch of CSV files, I create th

Re: [R] Alternatives to integrate?

2011-09-18 Thread . .
Hello all, Returning to this question, I would like to ask for help on how to integrate the PMF of a discrete distribution - Michael's guess about the most immediate problem (Sep 01, 2011; 2:44pm). I was thinking in two ways to do this: First is numerically integrate the function but sampling it

Re: [R] Removing a single element from an array

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 10:47 AM, Dennis Fisher wrote: R 2.13.1 OS X Colleagues I frequently encounter a situation in which I want to remove a single element of an array. For example, if I am reading in a bunch of CSV files, I create the list of files to be read with: LIST<- dir

Re: [R] Replacing matching values by related values

2011-09-18 Thread Janssen, K.J.M.
Apologies, I wanted to make life easier by shortly describing my problem. Indeed, it is better to post the full code. I am not familiar with the dput, but I have pasted the code that I have used below. d <- matrix(NA,15,5) d <- as.data.frame(d) colnames(d) <- c("studynumber

[R] Removing a single element from an array

2011-09-18 Thread Dennis Fisher
R 2.13.1 OS X Colleagues I frequently encounter a situation in which I want to remove a single element of an array. For example, if I am reading in a bunch of CSV files, I create the list of files to be read with: LIST<- dir() However, sometimes I want to exclude one or more files.

Re: [R] Replacing matching values by related values

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 3:56 AM, Janssen, K.J.M. wrote: Thanks Michael. I tested it and it works for numeric values, but not for the 'text' values that I am comparing, thus comparing "a" with "a","b", etc. Any advice how I can solve it? Solve what? You never posted full working code and an exp

Re: [R] calculating VAR of a (Gumbel) copula

2011-09-18 Thread David Winsemius
On Sep 18, 2011, at 5:51 AM, Iva wrote: Hello, I am a new user of R (2.13.1), my operational system is Windows Vista. I have a problem with the attached file SFEVaRHAC.r, calculating the VAR of a Gumbel copula, based on the attached GumHAC_VaR_PL_w250_n1000_s2500.txt 1. I had a Error i

Re: [R] "graph"

2011-09-18 Thread David Winsemius
On Sep 17, 2011, at 10:45 PM, Sandy Mitchell wrote: Hello, I have downloaded "graph" package from http://www.bioconductor.org/packages/release/bioc/html/graph.html Is there anyone who can teach me how to install "graph" into R? What happens when you follow the instructions on that pag

Re: [R] R kiteChart (plotrix) arguments

2011-09-18 Thread antqueen
excellent it worked, thanks so much Jim. I am new to R so still need time to get used to the commands! -- View this message in context: http://r.789695.n4.nabble.com/R-kiteChart-plotrix-arguments-tp3820688p3821729.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] R-help Digest, Vol 103, Issue 17

2011-09-18 Thread mihalicza . peter
Szeptember 12-től 26-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 12 till 26 September with no access to my emails. In urgent cases please contact

[R] calculating VAR of a (Gumbel) copula

2011-09-18 Thread Iva
Hello, I am a new user of R (2.13.1), my operational system is Windows Vista. I have a problem with the attached file SFEVaRHAC.r, calculating the VAR of a Gumbel copula, based on the attached GumHAC_VaR_PL_w250_n1000_s2500.txt 1. I had a Error in file(file, "rt") : cannot open the connection m

Re: [R] completing missing samples

2011-09-18 Thread Gabor Grothendieck
On Mon, Sep 12, 2011 at 4:42 AM, Eran Eidinger wrote: > Hello, > > I have a time-series that has some missing samples. > I was thinking on completing them using either zero-order hold or linear > interpolation. > I am looking for an efiicient way (other than a loop...) of identifiying the > missin

Re: [R] R kiteChart (plotrix) arguments

2011-09-18 Thread Jim Lemon
On 09/18/2011 04:42 AM, antqueen wrote: Hey, I hope someone is able to help. I've created a graph using kiteChart (in the plotrix package) but need to know how to perform some basic text alterations to the graph. I would like to re-orientate the text on the y-axis from vertical to horizontal.

Re: [R] Tobit Fixed Effects

2011-09-18 Thread Arne Henningsen
Hi Felipe On 18 September 2011 09:09, Felipe Nunes wrote: > Thanks, Arne! > But I'm having another problem now. When I transform my data into a > pdata.frame form and try to run a tobit model with random effects I get an > error. Below I provide the head of my data, the code I used and the error

Re: [R] completing missing samples

2011-09-18 Thread Eran Eidinger
Hello Michael, Joshua, Thanks alot for your replies, this really helps. As to my main problem - I am tryin to identify a cyclic behavior in a time-series using FFT, and I am struggiling with missing samples. It is not trivial that linear interpolation is the answer (it probably is not), but right

Re: [R] Replacing matching values by related values

2011-09-18 Thread Janssen, K.J.M.
Thanks Michael. I tested it and it works for numeric values, but not for the 'text' values that I am comparing, thus comparing "a" with "a","b", etc. Any advice how I can solve it? Thanks! -Oorspronkelijk bericht- Van: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Verzonden:

Re: [R] "graph"

2011-09-18 Thread Reza Salimi-Khorshidi
Hi Sandy, This might help: http://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source Best, Reza [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Tobit Fixed Effects

2011-09-18 Thread Felipe Nunes
Thanks, Arne! But I'm having another problem now. When I transform my data into a pdata.frame form and try to run a tobit model with random effects I get an error. Below I provide the head of my data, the code I used and the error message. Any help? > head(pdata)