[R] r and ocx
Hello dear community, I have written scripts in r that involve 3d plots (rgl library). I would like to know if there is a possibility of creating an OCX object that contains my code and plot? The reason is I need to embed my r script into another application that only accepts OCX This application would feed the OCX with the input ( a string in my case) and the OCX should output back the final 3d plot . I should be able to rotate that plot too... Sounds a bit impossible, but I know nothing is impossible...I hope! -- View this message in context: http://www.nabble.com/r-and-ocx-tp24748981p24748981.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] rscript write function
Hi, I have this very simple two-line script : test.r: print (abc); write(def,test.txt); When run with rscript.exe --vanilla test.r (or just rscript.exe test.r), I get the abc output in the shell but no file is created in the directory I noticed that the only time the test.txt gets written is when the test.r script is placed in the bin directory where rscript.exe resides. I want a way to execute my test.r script and output the corresponding file in another directory, without having to copy the rscript.exe and dlls to that directory. I hope there is a way!! (I have this constraint because I am developping a website that connects with R and my script resides in a session folder created dynamically for every user...) Thanks! -- View this message in context: http://www.nabble.com/rscript-write-function-tp21940621p21940621.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] rscript write function
OK, obviously that was a silly question... SOLUTION: just specify the path in the write function...! Sorry ! Applejus wrote: Hi, I have this very simple two-line script : test.r: print (abc); write(def,test.txt); When run with rscript.exe --vanilla test.r (or just rscript.exe test.r), I get the abc output in the shell but no file is created in the directory I noticed that the only time the test.txt gets written is when the test.r script is placed in the bin directory where rscript.exe resides. I want a way to execute my test.r script and output the corresponding file in another directory, without having to copy the rscript.exe and dlls to that directory. I hope there is a way!! (I have this constraint because I am developping a website that connects with R and my script resides in a session folder created dynamically for every user...) Thanks! -- View this message in context: http://www.nabble.com/rscript-write-function-tp21940621p21942388.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] PHP and R
Hi, I know I've already asked this question, but I am really getting trouble getting a PHP document execute an R function on windows. I would appreciate if someone could give me a simple example code where a php calls an R function and passes to it arguments, specifying also how to set up the paths etc... (should the .r file be in the www directory, and what settings should be done?) Thanks! -- View this message in context: http://www.nabble.com/PHP-and-R-tp21507207p21507207.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] PHP and R
Hi, I know that using PHP command exec(...) you can call a unix command that would run an R script, but how does it work on Windows platform? Basically, I have an R function which takes a file and two strings as arguments and I need to call this function and pass to it the arguments automatically from PHP (when the user hits a submit button on the webpage), any ideas?? Thanks! -- View this message in context: http://www.nabble.com/PHP-and-R-tp21397426p21397426.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] R and SPSS
Thanks all! Tobias Verbeke wrote: There exists a R plug-in for SPSS. You can find it on the SPSS website. ... and there is a page on the R wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:callingr:spss HTH, Tobias I have a code in R. Could anyone give me the best possible way (or just ways!) to integrate it in SPSS? I would doubt you could do this, but for the least provide commented, minimal, self-contained, reproducible code. It would help if you were more specific. Liviu -- Alain Guillet Statistician and Computer Scientist SMCS - Institut de statistique - Université catholique de Louvain Bureau d.126 Voie du Roman Pays, 20 B-1348 Louvain-la-Neuve Belgium tel: +32 10 47 30 50 [[alternative HTML version deleted]] __ 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. -- View this message in context: http://www.nabble.com/R-and-SPSS-tp20708367p20723360.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] R and SPSS
Hi, I have a code in R. Could anyone give me the best possible way (or just ways!) to integrate it in SPSS? Thanks! -- View this message in context: http://www.nabble.com/R-and-SPSS-tp20708367p20708367.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] opening an external file
Hi, Is there a way to launch a file from an R command? To be more precise: I am using windows, and I have an html file in the working directory of R, and I would like my code in R to automatically launch the html file in the browser (that is, open the file). Basically, i would like to simulate a user double-clicking on the html file to open it in a browser... Thanks -- View this message in context: http://www.nabble.com/opening-an-external-file-tp19260007p19260007.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] opening an external file
Thank you prof, Answered by the author of the function in question! :) Who could ask for more? Imad. Prof Brian Ripley wrote: On Mon, 1 Sep 2008, Henrique Dallazuanna wrote: See ?browseURL Or more generally on Windows, ?shell.exec (which is what browseURL does by default on Windows). On Mon, Sep 1, 2008 at 5:06 PM, Applejus [EMAIL PROTECTED] wrote: Hi, Is there a way to launch a file from an R command? To be more precise: I am using windows, and I have an html file in the working directory of R, and I would like my code in R to automatically launch the html file in the browser (that is, open the file). Basically, i would like to simulate a user double-clicking on the html file to open it in a browser... Thanks -- View this message in context: http://www.nabble.com/opening-an-external-file-tp19260007p19260007.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. -- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40 S 49? 16' 22 O [[alternative HTML version deleted]] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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. -- View this message in context: http://www.nabble.com/opening-an-external-file-tp19260007p19261520.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] graphsheet
Hello, I am trying to convert the following command from SPLUS to R: graphsheet(pages = TRUE) Does anyone have an idea what is the equivalent in R? Thanks -- View this message in context: http://www.nabble.com/graphsheet-tp19026010p19026010.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] The assign function in R
Thanks all for your help! Peter Dalgaard wrote: Prof Brian Ripley wrote: For the record, frame=1 and where=1 are not the same thing (whereas frame=0 and where=0 are both the session database): assign() in S has both 'frame' and 'where' arguments. Drats... I stand corrected. Thanks to Brian for clearing this up. -p where=1 is the first database on the search() path, and is roughly equivalent to the workspace (although you can attach databases ahead of the working database in S(-PLUS), people who write code like where=1 often do not know that). In S(-PLUS) there is a working database aka chapter, which is the nearest equivalent to the R workspace but is (conceptually) stored on disc and so permanent. It is like running R with --restore --save. Unless some other database is attached at pos=1, the working database is at where=1. The Blue Book contains the help page for assign() in S ca 1988, and apart from what where=0 means (which may well be a later addition) the information is all there. On Thu, 19 Jun 2008, Peter Dalgaard wrote: Duncan Murdoch wrote: Applejus wrote: Hello, I want to convert assign(a, b, where =1 ) from SPLUS to R. Is it safe to assume that the equivalent of where=1 is pos=1 in R? Thanks for help! Only a limited number of users here know what where=1 means in S-PLUS. If one of those doesn't answer, you might want to explain that for those of us who have forgotten or who never knew. Even some of those who should know may have forgotten by now... It is detailed in the Blue Book somewhere. As I recall it, the story is (or was?) that in S-PLUS objects are mostly on disk and the search path is a list of directories. Then there is a stack of evaluation frames plus two special frames, frame 0 and frame1. Frame 0 is permanent in the sense that it exists for the duration of the session, frame 1 exists during evaluation of expressions. Assignments to frame 1 were mostly done to overcome communication difficulties caused by the lack of lexical scope in S -- two different functions needing to work with the same temporary object would be the typical case. I would conjecture that once the purpose of the assignment to frame 1 is understood, you can redesign the code so that it becomes much cleaner, possibly by using - semantics. For a quick port, what you need is some sort of temporary environment. Assigning to pos=1 is NOT the solution, because that is the global environment and you will (A) risk clobbering an existing variable of the same name and (B) litter your workspace with intermediate results. -- 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. -- 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. -- View this message in context: http://www.nabble.com/The-assign-function-in-R-tp17918416p18016661.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] The assign function in R
Hello, I want to convert assign(a, b, where =1 ) from SPLUS to R. Is it safe to assume that the equivalent of where=1 is pos=1 in R? Thanks for help! -- View this message in context: http://www.nabble.com/The-assign-function-in-R-tp17918416p17918416.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] length functions
Hello, Does anyone know what the functions p_length and s_length do in SPLUS and what is their equivalent in R? Thanks! -- View this message in context: http://www.nabble.com/length-functions-tp17406498p17406498.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] length functions
Never mind! In fact I just discovered that the underscore and the - are used equivalently in SPLUS. Applejus wrote: Hello, Does anyone know what the functions p_length and s_length do in SPLUS and what is their equivalent in R? Thanks! -- View this message in context: http://www.nabble.com/length-functions-tp17406498p17412039.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] var function
Hello, I am trying to convert this splus line of code to R : var(outcome[1, ], unbiased = FALSE) It seems the var function in R doesn't have the unbiased argument. Could someone help me figure the correct equivalent line in R? Thank you -- View this message in context: http://www.nabble.com/var-function-tp17239936p17239936.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] is.category
Hello, Could someone tell me what the SPLUS is.category function do and what is its equivalent in R? Thank you, I couldn't find any help elsewhere... -- View this message in context: http://www.nabble.com/is.category-tp1719p1719.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] printing to the console in color
Hi, Is there a function that would allow me to print things in different colors to the CONSOLE, say one line in blue and another line in green? Right now, the print() function only prints in navy blue... Thanks! -- View this message in context: http://www.nabble.com/printing-to-the-console-in-color-tp16834851p16834851.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.