I am used to using R under unix. I have a problem with R under Windows-2000: Suppose I have a plain text file code.r full of R code that I want to source into R. My problem is that Windows invisibly tacks ".txt" onto the end of the filename (the name looks like code.r but it is really code.r.txt). How to get windows to both allow me to call it code.r (for real! Not code.r.txt) and to edit it as a text file by default (say with Notepad)? BTW is there any way to get Windows to stop its fiddling with the filename extensions? If I call something file.txt it appears as file (although the real name is file.txt) Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
put quotation marks before and after your file name: e.g. you want to save it as xxxx.r, then you should input it as "xxxx.r". hope it helps. Internet William.Simpson at drdc-rddc.gc.ca@stat.math.ethz.ch - 20/11/2002 20:48 Sent by: owner-r-help at stat.math.ethz.ch To: r-help cc: Subject: [R] FW: using R under windows I am used to using R under unix. I have a problem with R under Windows-2000: Suppose I have a plain text file code.r full of R code that I want to source into R. My problem is that Windows invisibly tacks ".txt" onto the end of the filename (the name looks like code.r but it is really code.r.txt). How to get windows to both allow me to call it code.r (for real! Not code.r.txt) and to edit it as a text file by default (say with Notepad)? BTW is there any way to get Windows to stop its fiddling with the filename extensions? If I call something file.txt it appears as file (although the real name is file.txt) Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._ This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
William,> Suppose I have a plain text file code.r full of R code > that I want to source into R. My problem is that Windows > invisibly tacks ".txt" onto the end of the filename (the name > looks like code.r but it is really code.r.txt). How to get > windows to both allow me to call it code.r (for real! Not > code.r.txt) and to edit it as a text file by default (say > with Notepad)? >BTW is there any way to get Windows to stop its fiddling with the filename >extensions? >If I call something file.txt it appears as file (although the real name is >file.txt)In the explorer go to the extras->folder options->views tab (translated from german, might not match exactly). There you can uncheck "hide extensions of known file-types". Beside that you might change your text-editor, notepad always fiddles around with the extensions. Try texpad with the s-plus code-color-scheme or winedt with the r-macros. Both really nice. Daniel -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More you need to tell us how you get Windows to add the extension. I think the solution is to use a real editor: NTemacs, Xemacs, PFE, .... (WinEdt if you want to pay for it.) BTW, R can source("foo.r.txt"). On Wed, 20 Nov 2002, Simpson, William wrote:> I am used to using R under unix. I have a problem with R > under Windows-2000: > Suppose I have a plain text file code.r full of R code > that I want to source into R. My problem is that Windows > invisibly tacks ".txt" onto the end of the filename (the name > looks like code.r but it is really code.r.txt). How to get > windows to both allow me to call it code.r (for real! Not > code.r.txt) and to edit it as a text file by default (say > with Notepad)? > > BTW is there any way to get Windows to stop its fiddling with the filename > extensions? > If I call something file.txt it appears as file (although the real name is > file.txt)It hides them in Explorer (but that's a tiny part of Windows). Go to Folder Options, View, untick `Hide extensions for known file types'. Surely you can find some local advice on such things? -- Brian D. Ripley, ripley at stats.ox.ac.uk 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._