[R] read.spss (package foreign) and SPSS 15.0 files
Hello, does anyone have experience with reading SPSS Version 15.0 files into R (version 2.4.1, WinXP)? I have long been sucessfully reading SPSS files with read.spss from the wonderful foreign package, but somehow after upgrading from SPSS14 to SPSS15 I seem to have problems. Trying a simple example, where test.sav is a SPSS 15.0 data file consisting of x1=c(1,2,3) and x2=c(a,b,c), I get this: read.spss(file = C:\\temp\\test.sav) Fehler in read.spss(file = C:\\temp\\test.sav) : error reading system-file header Zusätzlich: Warning message: C:\temp\test.sav: File-indicated character representation code (Unknown) is not ASCII version infos: R version 2.4.1 (under WinXP) foreign version 0.8-18 Has anyone experienced the same, and can give a solution here (possibly other than downgrade to SPSS14.0 ;-))? Regards, Heinrich. __ R-help@stat.math.ethz.ch 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] ACCESS/Office : connecting
Hi, you can use the RODBC pakage for that; see: library(RODBC) ?RODBC ?odbcConnectAccess ?sqlSave Regards, Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Milton Cezar Ribeiro Gesendet: Montag, 08. Jänner 2007 12:22 An: R-help Betreff: [R] ACCESS/Office : connecting Hi there, How can I connect to a ACCESS (.mdb) file? In fact, I would like to connect to a blank file, write a data.frame as table and after that INSERT records using some insert command. Kind regards, Miltinho Brazil __ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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-help@stat.math.ethz.ch 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] adding text to the corner of a lattice plot
Dear R community, I am using R 2.1.1 on Windows XP, package lattice Version 0.12-5, and want to add text (sort of a dat-stamp actually) to the lower left corner of a lattice plot, prefarably _after_ the plot has been created. Here is a simple example what I do in base graphics: # base graphics: plot(rnorm(100), rnorm(100)) mtext(as.character(Sys.Date()), side = 1,line = -2, outer = T, adj = 0, font = 1, cex = 0.7) How can I get the same using lattice? # lattice: require(lattice) xyplot(rnorm(100) ~ rnorm(100)) ??? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] market-basket analysis in R
Hi, I have asked a similar question quite a while ago, maybe you find the replys given in that thread useful: http://finzi.psych.upenn.edu/R/Rhelp02/archive/3977.html. Anyway, this is two years old now, so maybe there's some news in the meantime. Regards Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Wayne Jones Gesendet: Mittwoch, 09. Juni 2004 13:28 An: [EMAIL PROTECTED] Betreff: [R] market-basket analysis in R Hi there fellow R-users, Does anyone know if there exists a package for associated rules data mining (market basket analysis) in R. I have tried searching CRAN but with no luck. Regards Wayne KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:[EMAIL PROTECTED] http://www.kssg.com The information in this Internet email is confidential and m...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
AW: [R] signifikanz?
?cor tells you to See Also: cor.test where you can find everything you need. regards Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Martin Klaffenboeck Gesendet: Dienstag, 01. Juni 2004 15:15 An: r-help Betreff: [R] signifikanz? Hello, When I use: cor(x, y) I get a correlations coefficient. But how can I see if it is signifikant on a .95 or .99 level? Thanks, Martin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] Pb with RODBC installation
You need the precompiled binaries of packages for that: http://cran.at.r-project.org/bin/windows/contrib/1.8/RODBC_1.0-4.zip -Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von pascal dessaux Gesendet: Mittwoch, 25. Februar 2004 13:03 An: [EMAIL PROTECTED] Betreff: [R] Pb with RODBC installation Hello I'm starting to use R on a Windows XP Pro machine which is not connected to the internet; I want to use database connection so I downloaded the file RODBC_1.0-4.tar from CRAN; this file is not accepted by the Packages-Install Packages from local zip file menu function of R!!! I would like to know why it doesn't work and if it's possible to get database connection on a windows machine? Thanks you very much for your help Pascal __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
AW: [R] Paper on PAM and Clara
Maybe the following article is of interest for you (co-authored by P.J. Rousseeuw, like the book you mentioned): http://www.jstatsoft.org/v01/i04/paper/clus.pdf -Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Fucang Jia Gesendet: Donnerstag, 11. Dezember 2003 14:37 An: [EMAIL PROTECTED] Betreff: [R] Paper on PAM and Clara Hi, everyone, I found that Clara and Pam is very useful in large data clustering. So I want to learn more about it. But as far as I know, the idea is comes the authors' book Finding groups in data: an introduction to cluster analysis. Unfortunately, I have no access to this book. Could anyone tell me that if there are other papers which descirbes these methods? Thank you very much! Best, Fucang __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
AW: [R] Sampling
Hi, you can use something like example.data - data.frame(x=rnorm(209), y=rnorm(209)) selected.sample - example.data[sample(209,106), ] See ?sample. -Heinrich. -Ursprüngliche Nachricht- Von: Savano [mailto:[EMAIL PROTECTED] Gesendet: Montag, 01. Dezember 2003 13:38 An: Lista R Betreff: [R] Sampling UseRs, I imported a table using read.table. It has 209 observations, I want to select a sample with 106 observations. What function I use? thanks. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
AW: [R] ISOdate() and strptime()
Thanks for this clarification. I have learned in the meantime that it is necessary to be very careful when using all these POSIX things. As another example, here is something that made me scratch my head just yesterday: When I create a sequence of days that happens to start before and ends in daylight savings time, I seem to lose a day: seq(from = strptime(20030329, format=%Y%m%d), to= strptime(20030402, format=%Y%m%d), by=DSTday) [1] 2003-03-29 Westeuropäische Normalzeit 2003-03-30 Westeuropäische Normalzeit [3] 2003-03-31 Westeuropäische Sommerzeit 2003-04-01 Westeuropäische Sommerzeit seq(from = strptime(20030329, format=%Y%m%d), to= strptime(20030402, format=%Y%m%d), by=day) [1] 2003-03-29 00:00:00 Westeuropäische Normalzeit 2003-03-30 00:00:00 Westeuropäische Normalzeit [3] 2003-03-31 01:00:00 Westeuropäische Sommerzeit 2003-04-01 01:00:00 Westeuropäische Sommerzeit Again, my expectations might be wrong here, and there will be good reasons why I get this result (my OS again?). But considering all these subtle issues I have encountered so far, personally I can understand why some people suggested that it may be easier to use the chron or date package (especially if you are a beginner, have no prior experience with all these things, and don't want to worry about time zones, DST, or the pitfalls of your OS). At least it was useful for me to cross-check the results I obtained with POSIX with the results using chron. The POSIX classes are a great thing, but as they are much more powerful, they are also more complex and have more things to watch out for and more traps to fall in (for me at least ;-)). -Heinrich. -Ursprüngliche Nachricht- Von: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 22. November 2003 20:56 An: RINNER Heinrich Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Re: [R] ISOdate() and strptime() Confirmation that this *is* an OS-specific problem: A professional implementation of the POSIX standard (Solaris) gets all of these correct. Your so-called OS lacks any implementation of strptime, so we borrowed one from glibc. Unfortunately, that is buggy, even to the extent that unclass(strptime(2003-22-20, format=%Y-%m-%d)) unclass(strptime(2003 22 20, format=%Y %m %d)) give different answers! (And RH8.0 gives the same answers as the substitute code used on R for Windows.) I believe Simon Fear owes the R-developers a public apology for his (not properly referenced in the archives) reply to this thread. BDR On Fri, 14 Nov 2003, Prof Brian Ripley wrote: On Fri, 14 Nov 2003, RINNER Heinrich wrote: Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when wrong arguments (e.g., months12) are given to these functions: ISOdate(year=2003,month=2,day=20) #ok [1] 2003-02-20 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1] 2003-03-02 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=35) #wrong day, and returns NA [1] NA ISOdate(year=2003,month=2,day=40) #wrong day, but returns a value [1] 2003-02-04 01:12:00 Westeuropäische Normalzeit ISOdate(year=2003,month=22,day=20) #wrong month, but returns a value [1] 2003-02-02 21:12:00 Westeuropäische Normalzeit And almost the same with strptime(): strptime(2003-02-20, format=%Y-%m-%d) [1] 2003-02-20 strptime(2003-02-30, format=%Y-%m-%d) [1] 2003-03-02 strptime(2003-02-35, format=%Y-%m-%d) [1] NA strptime(2003-02-40, format=%Y-%m-%d) [1] 2003-02-04 strptime(2003-22-20, format=%Y-%m-%d) [1] NA Is this considered to be a user error (If you put garbage in, expect to get garbage out), or would it be safer to generally return Nas, as in ISOdate(year=2003,month=2,day=35)? Expect to get the best guess at what you intended, and expect this to depend on your OS. -- 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 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] ISOdate() and strptime()
I have followed with interest the discussion on date handling. I am no expert in these things; all I want to do is convert a character vector that has been read into R (and which may contain some erroneous dates) to a date format, and then do some work with it [e.g., use it in a plot]. Classes POSIXlt and POSIXct seem fine to me - for example, they have very nice and useful seq and plot methods. So now I have two more questions: 1. Is it only incomplete or erroneous dates that might be handled differently by ISOdate() or strptime()? Do correct specifications of year, month and day always give the same results, no matter where or who I am? 2. Can someone point me to a reference that helps me understand why R's (or the Operating systems?) best guess at what I intended turns out to be the results in the examples I posted in my earlier mail? Regards, Heinrich. -Ursprüngliche Nachricht- Von: RINNER Heinrich [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 14. November 2003 11:13 An: '[EMAIL PROTECTED]' Betreff: [R] ISOdate() and strptime() Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when wrong arguments (e.g., months12) are given to these functions: ISOdate(year=2003,month=2,day=20) #ok [1] 2003-02-20 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1] 2003-03-02 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=35) #wrong day, and returns NA [1] NA ISOdate(year=2003,month=2,day=40) #wrong day, but returns a value [1] 2003-02-04 01:12:00 Westeuropäische Normalzeit ISOdate(year=2003,month=22,day=20) #wrong month, but returns a value [1] 2003-02-02 21:12:00 Westeuropäische Normalzeit And almost the same with strptime(): strptime(2003-02-20, format=%Y-%m-%d) [1] 2003-02-20 strptime(2003-02-30, format=%Y-%m-%d) [1] 2003-03-02 strptime(2003-02-35, format=%Y-%m-%d) [1] NA strptime(2003-02-40, format=%Y-%m-%d) [1] 2003-02-04 strptime(2003-22-20, format=%Y-%m-%d) [1] NA Is this considered to be a user error (If you put garbage in, expect to get garbage out), or would it be safer to generally return Nas, as in ISOdate(year=2003,month=2,day=35)? -Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] ISOdate() and strptime()
Dear R-people! I am using R 1.8.0, under Windows XP. While using ISOdate() and strptime(), I noticed the following behaviour when wrong arguments (e.g., months12) are given to these functions: ISOdate(year=2003,month=2,day=20) #ok [1] 2003-02-20 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=30) #wrong day, but returns a value [1] 2003-03-02 13:00:00 Westeuropäische Normalzeit ISOdate(year=2003,month=2,day=35) #wrong day, and returns NA [1] NA ISOdate(year=2003,month=2,day=40) #wrong day, but returns a value [1] 2003-02-04 01:12:00 Westeuropäische Normalzeit ISOdate(year=2003,month=22,day=20) #wrong month, but returns a value [1] 2003-02-02 21:12:00 Westeuropäische Normalzeit And almost the same with strptime(): strptime(2003-02-20, format=%Y-%m-%d) [1] 2003-02-20 strptime(2003-02-30, format=%Y-%m-%d) [1] 2003-03-02 strptime(2003-02-35, format=%Y-%m-%d) [1] NA strptime(2003-02-40, format=%Y-%m-%d) [1] 2003-02-04 strptime(2003-22-20, format=%Y-%m-%d) [1] NA Is this considered to be a user error (If you put garbage in, expect to get garbage out), or would it be safer to generally return Nas, as in ISOdate(year=2003,month=2,day=35)? -Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] value of strptime in R 1.8.0
Dear R-people! I am using R 1.8.0, under Windows XP. What I want to do is a date conversion of a character column of a data frame and assign the result as a new column. Simple example: x - data.frame(a=c(yesterday,today,tomorrow), b=I(c(2003, 20031112, 20031113))) # convert x$b from character to date: strptime(x$b, format=%Y%m%d) [1] 2003-11-11 2003-11-12 2003-11-13 # trying to make this a new column in x: x$c - strptime(x$b, format=%Y%m%d) Error in $-.data.frame(`*tmp*`, c, value = strptime(x$b, format = %Y%m%d)) : replacement has 9 rows, data has 3 I have done this before (in R 1.7.0), and I am pretty sure this has been working then. What am I doing wrong here (has something changed concerning the value of strptime() in R 1.8.0)? -Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
AW: [R] R function help arranged in categorical order ?
There is a very nice Search Engine, with Keywords arranged by topic, that comes with R. If you are under Windows (and have Html help installed), you can find this in the Help menu, under Html help. (The relevant file can also be found as ...\doc\html\search\SearchEngine.html.) Maybe this helps, Heinrich. -Ursprüngliche Nachricht- Von: Neil Osborne [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 04. November 2003 15:56 An: [EMAIL PROTECTED] Betreff: [R] R function help arranged in categorical order ? Hi, I'm new to R and I'm finding it quite a chore trawling through the R documentation to find a function to carry out simple atomic tasks. Is any one aware of R help documentation that is aranged in functional categories for e.g.: String manipulation File I/O Dataframe, List manipulation etc, etc ... Thanks _ Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
AW: [R] Query: IRR Confidence Intervals
Hi Cristian, I don't know about a R routine for exact CIs, but I found a function called ageadjust using a gamma distribution approximation some time ago -take a look at http://medepi.org/epitools/rfunctions/index.html. That Webpage seems a bit outdated now, but the calculations given in the ageadjust functions should still work, I think. Maybe this helps; regards Heinrich. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Montag, 27. Oktober 2003 14:02 An: [EMAIL PROTECTED] Betreff: [R] Query: IRR Confidence Intervals Does anybody know a R routine to calculate exact Confidence Intervals for Incidence Rate Ratio? Thanks Cristian - Biometria - biometria.univr.it __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] read.spss (package foreign) and character columns
Thanks to Brian Ripley, Douglas Bates and Thomas Petzoldt for their comments. I agree that it is not really a problem, as you can easily use sub() after read.spss() to get rid of the blanks (I had already done that). On the other hand, it might be important to _know_ about the fact that characters are filled with blanks here. [I noticed it because I used a character variable as the common column in a merge(tab1,tab2,by=XCHAR), where tab1 came into R from an SPSS file using read.spss(), and tab2 came into R from an Excel file via odbc using odbcConnectExcel(). The merge failed on some cases, because some values of XCHAR from tab1 had trailing blanks, the values of tab2 had none.] I know now, so I know what to do in future cases. But as not everybody else might be aware of this, my suggestion would be that it could be worth adding a short comment about this in help(read.spss), so noone will be surprised. Regards, Heinrich. -Ursprüngliche Nachricht- Von: RINNER Heinrich [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 27. August 2003 18:06 An: '[EMAIL PROTECTED]' Betreff: [R] read.spss (package foreign) and character columns Dear R users! I am using R Version 1.7.1, Windows XP, package foreign (Version: 0.6-1), SPSS 11.5.1. There is one thing I noticed with read.spss, and I'd like to ask if this is considered to be a feature, or possibly a bug: When reading character columns, character strings seem to get filled with blanks at the end. Simple example: In SPSS, create a file with one variable called xchar of type A5 (character of length 5), and 3 values (a, ab, abcde), save it as test.sav. In R: library(foreign) test - read.spss(test.sav, to.data.frame=T) test XCHAR 1 a 2 ab 3 abcde levels(test$XCHAR) [1] a ababcde Shouldn't it rather be a ab abcde (no blanks)? -Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] read.spss (package foreign) and character columns
Dear R users! I am using R Version 1.7.1, Windows XP, package foreign (Version: 0.6-1), SPSS 11.5.1. There is one thing I noticed with read.spss, and I'd like to ask if this is considered to be a feature, or possibly a bug: When reading character columns, character strings seem to get filled with blanks at the end. Simple example: In SPSS, create a file with one variable called xchar of type A5 (character of length 5), and 3 values (a, ab, abcde), save it as test.sav. In R: library(foreign) test - read.spss(test.sav, to.data.frame=T) test XCHAR 1 a 2 ab 3 abcde levels(test$XCHAR) [1] a ababcde Shouldn't it rather be a ab abcde (no blanks)? -Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] RODBC and Oracle: error table does not exist
I am re-trying a question I asked 12 days ago, to which unfortunately I got no answer so far. Maybe someone who has succesfully established ODBC connections between R and Oracle can give a hint what I am doing wrong? -Ursprüngliche Nachricht- Von: RINNER Heinrich [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 09. Juli 2003 15:34 An: '[EMAIL PROTECTED]' Betreff: [R] RODBC and Oracle: error table does not exist Dear r-helpers! I have trouble reading data from an Oracle data base using RODBC Version 1.0-3, R Version 1.7.1, Windows XP, Oracle8 ODBC Driver Version 8.1.6.4.0: library(RODBC) channel - odbcConnect(dsn=PAV32, case=oracle, believeNRows=FALSE) # ok, this was succesful x - sqlTables(channel) x[37, ] TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 37NA TKF ABTGRNAMEN TABLENA # ok, so the table I am looking for (ABTGRNAMEN) is there, but: sqlFetch(channel, ABTGRNAMEN) [1] [RODBC] ERROR: Could not SQLExecute [2] S0002 942 [Oracle][ODBC][Ora]ORA-00942: table or view does not exist\n # I also tried: sqlFetch(channel, TKF.ABTGRNAMEN) Error in odbcTableExists(channel, sqtable) : TKF.ABTGRNAMEN : table not found on channel What am I doing wrong here? It doesn't work with other tables as well; on the other hand, connecting to the table(s) in MS Access works fine using the same ODBC driver. Best regards, Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
AW: [R] R commands from a text file ?
You can use source(): For example source(C:\temp\foo.R) wher foo.R is a text fiel containing R commands. Regards, Heinrich. -Ursprüngliche Nachricht- Von: orkun [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Juli 2003 08:47 An: R-help Betreff: [R] R commands from a text file ? Hello I was wondering if it was possible to enter R commands from an external text file. If it is possible, it will be easy for repetetive tasks. Does anyone have an idea ? thanks in advance Ahmet Temiz TURKEY __ __ The views and opinions expressed in this e-mail message are ...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] RODBC and Oracle: error table does not exist
Dear Marc, thanks very much for your answer!! Adding quotes to the table names didn't change anything (I had tried that before), but creating synonyms in Oracle did the trick! Everything is working fine now, so thanks again. -Heinrich. -Ursprüngliche Nachricht- Von: Marc Mamin [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Juli 2003 09:11 An: 'RINNER Heinrich' Betreff: RE: [R] RODBC and Oracle: error table does not exist hallo, I'm using following syntax: which is working fine (with Oracle 8.1.7.2): channel - sh3 - sqlQuery(channel, select .) odbcClose(channel) myd - data.frame(sh3) rm(sh3) Some other things you may check or try: - add quotes to the table names : sqlFetch(channel, \ABTGRNAMEN\) - if you are not connecting as the user TKF , you may try to create synonyms in oracle: sqlplus TKF/[EMAIL PROTECTED] SQL create synonym ABTGRNAMEN for TKF.ABTGRNAMEN HTH, Marc Mamin -Original Message- From: RINNER Heinrich [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 8:53 AM To: '[EMAIL PROTECTED]' Subject: RE: [R] RODBC and Oracle: error table does not exist I am re-trying a question I asked 12 days ago, to which unfortunately I got no answer so far. Maybe someone who has succesfully established ODBC connections between R and Oracle can give a hint what I am doing wrong? -Ursprüngliche Nachricht- Von: RINNER Heinrich [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 09. Juli 2003 15:34 An: '[EMAIL PROTECTED]' Betreff: [R] RODBC and Oracle: error table does not exist Dear r-helpers! I have trouble reading data from an Oracle data base using RODBC Version 1.0-3, R Version 1.7.1, Windows XP, Oracle8 ODBC Driver Version 8.1.6.4.0: library(RODBC) channel - odbcConnect(dsn=PAV32, case=oracle, believeNRows=FALSE) # ok, this was succesful x - sqlTables(channel) x[37, ] TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 37NA TKF ABTGRNAMEN TABLENA # ok, so the table I am looking for (ABTGRNAMEN) is there, but: sqlFetch(channel, ABTGRNAMEN) [1] [RODBC] ERROR: Could not SQLExecute [2] S0002 942 [Oracle][ODBC][Ora]ORA-00942: table or view does not exist\n # I also tried: sqlFetch(channel, TKF.ABTGRNAMEN) Error in odbcTableExists(channel, sqtable) : TKF.ABTGRNAMEN : table not found on channel What am I doing wrong here? It doesn't work with other tables as well; on the other hand, connecting to the table(s) in MS Access works fine using the same ODBC driver. Best regards, Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] RODBC and Oracle: error table does not exist
Dear r-helpers! I have trouble reading data from an Oracle data base using RODBC Version 1.0-3, R Version 1.7.1, Windows XP, Oracle8 ODBC Driver Version 8.1.6.4.0: library(RODBC) channel - odbcConnect(dsn=PAV32, case=oracle, believeNRows=FALSE) # ok, this was succesful x - sqlTables(channel) x[37, ] TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS 37NA TKF ABTGRNAMEN TABLENA # ok, so the table I am looking for (ABTGRNAMEN) is there, but: sqlFetch(channel, ABTGRNAMEN) [1] [RODBC] ERROR: Could not SQLExecute [2] S0002 942 [Oracle][ODBC][Ora]ORA-00942: table or view does not exist\n # I also tried: sqlFetch(channel, TKF.ABTGRNAMEN) Error in odbcTableExists(channel, sqtable) : TKF.ABTGRNAMEN : table not found on channel What am I doing wrong here? It doesn't work with other tables as well; on the other hand, connecting to the table(s) in MS Access works fine using the same ODBC driver. Best regards, Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] downloading packages and AntiVirus program
Dear R-users! I am using R 1.7.0, under Windows XP; I also have Internet Explorer 6.0.2600., Norton AntiVirus 7.60.926. Our firewall seems to want to protect me from downloading precompiled packages for Windows. When I try to download packages, like http://cran.at.r-project.org/bin/windows/contrib/1.7/RODBC_1.0-3.zip for example, I am not allowed to and get a message like this: The content you just requested had a problem and was blocked by the Symantec AntiVirus Scan Engine based on local administrator settings. I called our network hotline, but they insisted that these files contain viruses and wouldn't let me download them. As I'm sure that not all packages on CRAN will contain viruses (!), I am asking here for support, maybe in the form of arguments like These files definitely contain no viruses, but they may give false virus warnings because Has anyone else experienced this problem? Regards, Heinrich. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help