Re: [R] Problem in reading Excel spreadsheets
Hi Ivan, Thanks for your advice. I have problem running xlsReadWrite on 64 bit Win7. library(xlsReadWrite) xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular shlib (420 KB) by executing the following command: xls.getshlib() Info, forum, issue tracker and manual download at http://www.swissr.org. BACKGROUND: Our own xlsReadWrite code is free, but we also use proprietary code (Flexcel, tmssoftware.com) which can only be distributed legally in precompiled, i.e. binary form. As CRAN 'generally does not accept submissions of precompiled binaries due to security reasons' we only provide a placeholder and you can download the binary shlib separately. NO GUARANTEES: We have done thorough tests initially and there are integrity checks, but we do _not_ give any guarantees. You can check/clone the source code at http://github.com/swissr/xlsreadwrite, in case of any issues we are happy to hear about them (bug tracker/forum/email). xls.getshlib() Loading required package: tools --- xls.getshlib running... --- Error in xls.getshlib() : currently only windows (32 bit) supported xls.getshlib only runs on 32 bit Windows. I must go back to 32 bit Win 7. B.R. Stephen L From: Ivan Calandra ivan.calan...@uni-hamburg.de To: r-help@r-project.org Sent: Wed, December 1, 2010 5:05:40 PM Subject: Re: [R] Problem in reading Excel spreadsheets Hi, I don't know much about RODBC, but the package xlsReadWrite works pretty well for me for reading and writing xls files (and it doesn't need Perl or anything else to run). Ivan Le 12/1/2010 08:56, Stephen Liu a écrit : Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel spreadsheets (the text file, research_databaseI.xls, was download on Internet) data=odbcConnectExcel(file.choose()) sqlTables(data) TABLE_CAT TABLE_SCHEM 1 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 2 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 3 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 4 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 5 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 6 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 7 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 8 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 9 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 10 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 11 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 12 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 13 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 14 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 15 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 16 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 17 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 18 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 19 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 20 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 21 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 22 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 23 C:\\Users\\satimiswin764\\Documents\\research_databaseINA TABLE_NAME TABLE_TYPE REMARKS 1 AGR$ SYSTEM TABLENA 2 BMC$ SYSTEM TABLENA 3 Dairy$ SYSTEM TABLENA 4 GDP$ SYSTEM TABLENA 5 HIES$ SYSTEM TABLENA 6 Manuf$ SYSTEM TABLENA 7Prices$ SYSTEM TABLENA 8Sheet1$ SYSTEM TABLENA 9 WPI$ SYSTEM TABLENA 10 'Approved plans$'TABLENA 11 'Emp stats$'TABLENA 12 'Ex rates$'TABLENA 13'hotel occ rates$'TABLENA 14 'Insurance co$'TABLENA 15 'Interest rates$'TABLENA 16'Motor V$'TABLENA 17 'Ostrich Projects$'TABLENA 18 'Prop dev$'TABLENA 19'tourism est$'TABLENA 20 'tourism est'$_FilterDatabaseTABLENA 21 'Travel agents$'TABLENA 22 'Umempl stats$'TABLENA 23 'US CPI$'TABLENA mydata=sqlFetch(data, AGR) odbcClose(data) mydata The printout doesn't look like the content of Excel spreadsheet. Many data disappear. I read ?RODBC and the pdf file started with RShowDoc(RODBC, package=RODBC). I couldn't figure out the cause of problem. Is RODBC not the way to read Excel spreadsheets on R? TIA B.R. Stephen L
Re: [R] Problem in reading Excel spreadsheets
Hi Ivan, Thanks for your further advice. RODBC works without problem. Following steps are correct. library(RODBC) data=odbcConnectExcel(file.choose()) sqlTables(data) TABLE_CAT TABLE_SCHEM 1 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA 2 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA 3 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA 4 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA 5 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA 6 C:\\Users\\satimiswin764\\Documents\\copy_of_RDemoDevNA TABLE_NAME TABLE_TYPE REMARKS 1 Graphics$ SYSTEM TABLENA 2 Interactive$ SYSTEM TABLENA 3 MyDataframe$ SYSTEM TABLENA 4gggTABLENA 5mypivotTABLENA 6 'Pivot table$'TABLENA mydata=sqlFetch(data, MyDataframe) odbcClose(data) mydata Gender Weight Size SizeM SizeF F6 F7 1# 1m 68 183 177 178 NA NA NA 2m 80 184 160 176 NA NA NA 3f 62 173 171 175 NA NA NA 4f 55 165 164 185 NA NA 2 5f 60 165 165 190 NA NA NA 6m 70 185NA 185 NA NA 3 7m 81 179 165 175 NA NA NA 8m 93 185 173 184 NA NA NA 9f 70 178 172 184 NA NA 4 10 f 75 168 160 180 NA NA NA . My finding is RODBC can't handle complicate .xls file nor .xlsx file (maybe odbcConnectExcel2007 can work on .xlsx. I haven't tried), with multiple headers, merged cells etc. My goal is to import data of .xls/xlsx file on R console, run R commands and export the result back to spreadsheet. RExcel and R and Calc can do the job. RExcel, 32bit, runs on Windows. R and Calc, 32/64bit, runs on both Windows and Linux. I have all of them running on VMs of this virtual machine. I'm now moving there. Sorry I haven't tried the packages/applications suggested. R is new to me. I started venturing R on about early last month. I knew R for sometimes before. There are some other alternative steps running RODBC tried by me which I'm not going listing all of them here otherwise the size of this email will be increased. Thanks again for your help. B.R. Stephen L From: Ivan Calandra ivan.calan...@uni-hamburg.de Cc: r-help@r-project.org Sent: Wed, December 1, 2010 6:57:12 PM Subject: Re: [R] Problem in reading Excel spreadsheets Hi again, There are also other packages to read and write xls files, including gdata (read), dataframe2xls and writeXLS (write), which depend on Perl or Python if I'm not mistaken. I have no idea whether they work on Windows 64 bits. Visit Crantastic http://crantastic.org/ Ivan Le 12/1/2010 10:34, Stephen Liu a écrit : Hi Ivan, Thanks for your advice. I have problem running xlsReadWrite on 64 bit Win7. library(xlsReadWrite) xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular shlib (420 KB) by executing the following command: xls.getshlib() Info, forum, issue tracker and manual download at http://www.swissr.org. BACKGROUND: Our own xlsReadWrite code is free, but we also use proprietary code (Flexcel, tmssoftware.com) which can only be distributed legally in precompiled, i.e. binary form. As CRAN 'generally does not accept submissions of precompiled binaries due to security reasons' we only provide a placeholder and you can download the binary shlib separately. NO GUARANTEES: We have done thorough tests initially and there are integrity checks, but we do _not_ give any guarantees. You can check/clone the source code at http://github.com/swissr/xlsreadwrite, in case of any issues we are happy to hear about them (bug tracker/forum/email). xls.getshlib() Loading required package: tools --- xls.getshlib running... --- Error in xls.getshlib() : currently only windows (32 bit) supported xls.getshlib only runs on 32 bit Windows. I must go back to 32 bit Win 7. B.R. Stephen L *From:* Ivan Calandra ivan.calan...@uni-hamburg.de *To:* r-help@r-project.org *Sent:* Wed, December 1, 2010 5:05:40 PM *Subject:* Re: [R] Problem in reading Excel spreadsheets Hi, I don't know much about RODBC, but the package xlsReadWrite works pretty well for me for reading and writing xls files (and it doesn't need Perl or anything else to run). Ivan Le 12/1/2010 08:56, Stephen Liu a écrit : Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel spreadsheets (the text file, research_databaseI.xls, was download on Internet) data=odbcConnectExcel(file.choose()) sqlTables(data) TABLE_CAT
[R] Problem in reading Excel spreadsheets
Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel spreadsheets (the text file, research_databaseI.xls, was download on Internet) data=odbcConnectExcel(file.choose()) sqlTables(data) TABLE_CAT TABLE_SCHEM 1 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 2 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 3 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 4 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 5 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 6 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 7 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 8 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 9 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 10 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 11 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 12 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 13 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 14 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 15 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 16 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 17 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 18 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 19 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 20 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 21 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 22 C:\\Users\\satimiswin764\\Documents\\research_databaseINA 23 C:\\Users\\satimiswin764\\Documents\\research_databaseINA TABLE_NAME TABLE_TYPE REMARKS 1 AGR$ SYSTEM TABLENA 2 BMC$ SYSTEM TABLENA 3 Dairy$ SYSTEM TABLENA 4 GDP$ SYSTEM TABLENA 5 HIES$ SYSTEM TABLENA 6 Manuf$ SYSTEM TABLENA 7Prices$ SYSTEM TABLENA 8Sheet1$ SYSTEM TABLENA 9 WPI$ SYSTEM TABLENA 10 'Approved plans$'TABLENA 11 'Emp stats$'TABLENA 12 'Ex rates$'TABLENA 13'hotel occ rates$'TABLENA 14 'Insurance co$'TABLENA 15 'Interest rates$'TABLENA 16'Motor V$'TABLENA 17 'Ostrich Projects$'TABLENA 18 'Prop dev$'TABLENA 19'tourism est$'TABLENA 20 'tourism est'$_FilterDatabaseTABLENA 21 'Travel agents$'TABLENA 22 'Umempl stats$'TABLENA 23 'US CPI$'TABLENA mydata=sqlFetch(data, AGR) odbcClose(data) mydata The printout doesn't look like the content of Excel spreadsheet. Many data disappear. I read ?RODBC and the pdf file started with RShowDoc(RODBC, package=RODBC). I couldn't figure out the cause of problem. Is RODBC not the way to read Excel spreadsheets on R? TIA B.R. Stephen L [[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.
Re: [R] Where is gdata?
Hi Liviu, Not if you library(gdata) first. Then ?read.xls should work. Yes, I did. I found something strange here which I can't explain. Win 7 64bit R 32/64 bit Just rebooted Win 7 and R library(gdata) gdata: Unable to locate valid perl interpreter gdata: gdata: read.xls() will be unable to read Excel XLS and XLSX files gdata: unless the 'perl=' argument is used to specify the location of a gdata: valid perl intrpreter. gdata: gdata: (To avoid display of this message in the future, please ensure gdata: perl is installed and available on the executable search path.) gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLX' (Excel 97-2004) files. gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLSX' (Excel 2007+) files. gdata: Run the function 'installXLSXsupport()' gdata: to automatically download and install the perl gdata: libaries needed to support Excel XLS and XLSX formats. Attaching package: 'gdata' The following object(s) are masked from 'package:utils': object.size It complains. ?read.xls starting httpd help server ... done Read Excel files Both 32 and 64 bit R worked. If there is NO complaint on running; library(gdata) Then ?read.xls can't work. Perl seems has been installed. But I can't recall, when and how; C:\dir C:\Users\satimiswin764\Documents\R\win-library\2.12\gdata\ . 11/22/2010 10:44 AMDIR perl 11/22/2010 10:44 AMDIR R 11/22/2010 10:44 AMDIR unitTests 11/22/2010 10:44 AMDIR xls dir C:\Users\satimiswin764\My Documents\R\win-library\2.12\gdata\perl 11/22/2010 10:44 AMDIR . 11/22/2010 10:44 AMDIR .. 11/22/2010 10:44 AMDIR Archive 11/22/2010 10:44 AM 418 install_modules.pl 11/22/2010 10:44 AMDIR IO 11/22/2010 10:44 AM 2,710 module_tools.pl 11/22/2010 10:44 AMDIR OLE 11/22/2010 10:44 AM 2,019 sheetCount.pl 11/22/2010 10:44 AM 2,019 sheetNames.pl 11/22/2010 10:44 AMDIR Spreadsheet 11/22/2010 10:44 AM 550 supportedFormats.pl 11/22/2010 10:44 AM 114 VERSIONS 11/22/2010 10:44 AM 5,512 xls2csv.pl 11/22/2010 10:44 AM 5,512 xls2tab.pl 11/22/2010 10:44 AM 5,512 xls2tsv.pl 9 File(s) 24,366 bytes 6 Dir(s) 16,776,032,256 bytes free B.R. Stephen L From: Liviu Andronic landronim...@gmail.com Cc: Gabor Grothendieck ggrothendi...@gmail.com; r-help r-help@r-project.org Sent: Mon, November 29, 2010 2:40:16 PM Subject: Re: [R] Where is gdata? ?read.xls I must run ??read.xls Not if you library(gdata) first. Then ?read.xls should work. Regards Liviu [[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.
Re: [R] Where is gdata?
Hi Spencer, Download and install Strawberry perl from http://strawberryperl.com; Installation went through without problem. Start R library(gdata) gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED. gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED. Attaching package: 'gdata' The following object(s) are masked from 'package:utils': object.size ?read.xls starts Read Excel files. Thanks B.R. Stephen L From: Spencer Graves spencer.gra...@structuremonitoring.com Cc: Liviu Andronic landronim...@gmail.com; r-help r-help@r-project.org Sent: Mon, November 29, 2010 4:57:53 PM Subject: Re: [R] Where is gdata? Hi, Stephen: The directory C:\Users\satimiswin764\My Documents\R\win-library\2.12\gdata\perl is NOT the perl interpreter but only perl code in the gdata package for R, invoked by certain R commands. You need to install something like Strawberry perl, as I've previously stated. Spencer On 11/29/2010 12:44 AM, Stephen Liu wrote: Hi Liviu, Not if you library(gdata) first. Then ?read.xls should work. Yes, I did. I found something strange here which I can't explain. Win 7 64bit R 32/64 bit Just rebooted Win 7 and R library(gdata) gdata: Unable to locate valid perl interpreter gdata: gdata: read.xls() will be unable to read Excel XLS and XLSX files gdata: unless the 'perl=' argument is used to specify the location of a gdata: valid perl intrpreter. gdata: gdata: (To avoid display of this message in the future, please ensure gdata: perl is installed and available on the executable search path.) gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLX' (Excel 97-2004) files. gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLSX' (Excel 2007+) files. gdata: Run the function 'installXLSXsupport()' gdata: to automatically download and install the perl gdata: libaries needed to support Excel XLS and XLSX formats. Attaching package: 'gdata' The following object(s) are masked from 'package:utils': object.size It complains. ?read.xls starting httpd help server ... done Read Excel files Both 32 and 64 bit R worked. If there is NO complaint on running; library(gdata) Then ?read.xls can't work. Perl seems has been installed. But I can't recall, when and how; C:\dir C:\Users\satimiswin764\Documents\R\win-library\2.12\gdata\ . 11/22/2010 10:44 AMDIR perl 11/22/2010 10:44 AMDIR R 11/22/2010 10:44 AMDIR unitTests 11/22/2010 10:44 AMDIR xls dir C:\Users\satimiswin764\My Documents\R\win-library\2.12\gdata\perl 11/22/2010 10:44 AMDIR . 11/22/2010 10:44 AMDIR .. 11/22/2010 10:44 AMDIR Archive 11/22/2010 10:44 AM 418 install_modules.pl 11/22/2010 10:44 AMDIR IO 11/22/2010 10:44 AM 2,710 module_tools.pl 11/22/2010 10:44 AMDIR OLE 11/22/2010 10:44 AM 2,019 sheetCount.pl 11/22/2010 10:44 AM 2,019 sheetNames.pl 11/22/2010 10:44 AMDIR Spreadsheet 11/22/2010 10:44 AM 550 supportedFormats.pl 11/22/2010 10:44 AM 114 VERSIONS 11/22/2010 10:44 AM 5,512 xls2csv.pl 11/22/2010 10:44 AM 5,512 xls2tab.pl 11/22/2010 10:44 AM 5,512 xls2tsv.pl 9 File(s) 24,366 bytes 6 Dir(s) 16,776,032,256 bytes free B.R. Stephen L From: Liviu Androniclandronim...@gmail.com Cc: Gabor Grothendieckggrothendi...@gmail.com; r-helpr-help@r-project.org Sent: Mon, November 29, 2010 2:40:16 PM Subject: Re: [R] Where is gdata? ?read.xls I must run ??read.xls Not if you library(gdata) first. Then ?read.xls should work. Regards Liviu [[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. -- Spencer Graves, PE, PhD President and Chief Operating Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San José, CA 95126 ph: 408-655-4567 [[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.
Re: [R] Where is gdata?
Hi Gabor, - snip - .. The following object(s) are masked from 'package:utils': : object.size This is just a message that it can't find perl. If you don't need to use read.xls then you don't need perl so you can ignore the message. If you do need to use read.xls then install perl and once you have done that then run installXLSXsupport(). After having installed Strawberry perl the warning disappears. library(gdata) ?read.xls works starting Read Excel files I haven't run installXLSXsupport() afterwards. Just did it without success. installXLSXsupport() Error: could not find function installXLSXsupport Couldn't proceed further. I can't resolve follows; 1) library(AER) data() starts the datasets of AER 2) library(gdata) data() gdata is added to the list of master dataset package ? B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com Cc: Liviu Andronic landronim...@gmail.com; r-help r-help@r-project.org Sent: Mon, November 29, 2010 8:39:55 PM Subject: Re: [R] Where is gdata? Hi Liviu, Not if you library(gdata) first. Then ?read.xls should work. Yes, I did. I found something strange here which I can't explain. Win 7 64bit R 32/64 bit Just rebooted Win 7 and R library(gdata) gdata: Unable to locate valid perl interpreter gdata: gdata: read.xls() will be unable to read Excel XLS and XLSX files gdata: unless the 'perl=' argument is used to specify the location of a gdata: valid perl intrpreter. gdata: gdata: (To avoid display of this message in the future, please ensure gdata: perl is installed and available on the executable search path.) gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLX' (Excel 97-2004) files. gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLSX' (Excel 2007+) files. gdata: Run the function 'installXLSXsupport()' gdata: to automatically download and install the perl gdata: libaries needed to support Excel XLS and XLSX formats. Attaching package: 'gdata' The following object(s) are masked from 'package:utils': object.size This is just a message that it can't find perl. If you don't need to use read.xls then you don't need perl so you can ignore the message. If you do need to use read.xls then install perl and once you have done that then run installXLSXsupport(). It complains. ?read.xls starting httpd help server ... done Read Excel files Both 32 and 64 bit R worked. If there is NO complaint on running; library(gdata) Then ?read.xls can't work. Can you clarify when ?read.xls works for you and when it does not? Perl seems has been installed. But I can't recall, when and how; C:\dir C:\Users\satimiswin764\Documents\R\win-library\2.12\gdata\ . 11/22/2010 10:44 AMDIR perl 11/22/2010 10:44 AMDIR R 11/22/2010 10:44 AMDIR unitTests 11/22/2010 10:44 AMDIR xls The gdata\perl folder contains perl libraries that come with gdata. Perl itself is not distributed with gdata and you don't need perl at all to use gdata except for read.xls and related functions. My understanding is that this question has nothing to do with perl nor with read.xls and that the problem is that you seem to be able to run this: library(gdata) ?read.xls and sometimes it works and at other times it does not work. Is that right? Does it occur with any other package? How about removing gdata and reinstalling it? remove.packages(gdata) ... exit R and check if gdata has been removed ... ... restart R ... install.packages(gdata) -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[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.
Re: [R] Where is gdata?
Hi Gabor, Please start at a fresh version of R. Copy and paste your session from the R console rather than relating what happened. Also, what version of gdata are you using? Older versions did not have installXLSXsupport. Show: packageDescription(gdata)$Version win.version() R.version.string packageDescription(gdata)$Version [1] 2.8.1 win.version() [1] Windows 7 x64 (build 7600) R.version.string [1] R version 2.12.0 (2010-10-15) Both 32 and 64 bits 2) library(gdata) data() gdata is added to the list of master dataset package This is not clear. Please provide exact and complete output. File gdata_output.txt is attached to this email. Following lines are added to the bottom of the file:- Data sets in package ‘gdata’: MedUnitsTable of conversions between Intertional Standard (SI) and US - end - B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help r-help@r-project.org Sent: Mon, November 29, 2010 11:31:18 PM Subject: Re: [R] Where is gdata? On Mon, Nov 29, 2010 at 10:18 AM, Stephen Liu sati...@yahoo.com wrote: Hi Gabor, - snip - .. The following object(s) are masked from 'package:utils': : object.size This is just a message that it can't find perl. If you don't need to use read.xls then you don't need perl so you can ignore the message. If you do need to use read.xls then install perl and once you have done that then run installXLSXsupport(). After having installed Strawberry perl the warning disappears. library(gdata) ?read.xls works starting Read Excel files I haven't run installXLSXsupport() afterwards. Just did it without success. installXLSXsupport() Error: could not find function installXLSXsupport Couldn't proceed further. Please start at a fresh version of R. Copy and paste your session from the R console rather than relating what happened. Also, what version of gdata are you using? Older versions did not have installXLSXsupport. Show: packageDescription(gdata)$Version win.version() R.version.string I can't resolve follows; 1) library(AER) data() starts the datasets of AER 2) library(gdata) data() gdata is added to the list of master dataset package This is not clear. Please provide exact and complete output. B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: Liviu Andronic landronim...@gmail.com; r-help r-help@r-project.org Sent: Mon, November 29, 2010 8:39:55 PM Subject: Re: [R] Where is gdata? On Mon, Nov 29, 2010 at 3:44 AM, Stephen Liu sati...@yahoo.com wrote: Hi Liviu, Not if you library(gdata) first. Then ?read.xls should work. Yes, I did. I found something strange here which I can't explain. Win 7 64bit R 32/64 bit Just rebooted Win 7 and R library(gdata) gdata: Unable to locate valid perl interpreter gdata: gdata: read.xls() will be unable to read Excel XLS and XLSX files gdata: unless the 'perl=' argument is used to specify the location of a gdata: valid perl intrpreter. gdata: gdata: (To avoid display of this message in the future, please ensure gdata: perl is installed and available on the executable search path.) gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLX' (Excel 97-2004) files. gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLSX' (Excel 2007+) files. gdata: Run the function 'installXLSXsupport()' gdata: to automatically download and install the perl gdata: libaries needed to support Excel XLS and XLSX formats. Attaching package: 'gdata' The following object(s) are masked from 'package:utils': object.size This is just a message that it can't find perl. If you don't need to use read.xls then you don't need perl so you can ignore the message. If you do need to use read.xls then install perl and once you have done that then run installXLSXsupport(). It complains. ?read.xls starting httpd help server ... done Read Excel files Both 32 and 64 bit R worked. If there is NO complaint on running; library(gdata) Then ?read.xls can't work. Can you clarify when ?read.xls works for you and when it does not? Perl seems has been installed. But I can't recall, when and how; C:\dir C:\Users\satimiswin764\Documents\R\win-library\2.12\gdata\ . 11/22/2010 10:44 AMDIR perl 11/22/2010 10:44 AMDIR R 11/22/2010 10:44 AMDIR unitTests 11/22/2010 10:44 AMDIR xls The gdata\perl folder contains perl libraries that come with gdata. Perl itself is not distributed with gdata and you don't need perl at all to use gdata except for read.xls and related functions. My understanding is that this question has nothing to do with perl nor with read.xls and that the problem is that you seem
Re: [R] Where is gdata?
Hi Gabor, That is the correct version of gdata. I am using Windows 32 so there could be some differences due to that. At any rate, can you start a fresh R session and show the console output of the problems you have seen. Use Rgui --vanilla to start R to be sure you don't have anything else that might interfere and show everything including the R startup message in the R console output. Each time I start R clicking Rgui short-cut on Win7 desktop. In order to clear all residue I reboot Win7 and click Rgui short-cut to start R Output:- R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Loading required package: rcom Loading required package: rscproxy rcom requires a current version of statconnDCOM installed. To install statconnDCOM type installstatconnDCOM() This will download and install the current version of statconnDCOM You will need a working Internet connection because installation needs to download a file. [Previously saved workspace restored] It seems no complaint there. I start another Win7 64bit VM on this virtual machine (Remark: This is a virtual machine with 3 Win7,64bit, 1 Win7, 32bit, 2 Ubuntu 10.10,64 bit, 2 Debian 6, 64bit, etc. running. All VMs have R installed) evoke Rgui on desktop. Output: R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. The output looks same as previous one up to:- .. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. gdata not installed packageDescription(gdata)$Version Error in packageDescription(gdata)$Version : $ operator is invalid for atomic vectors In addition: Warning message: In packageDescription(gdata) : no package 'gdata' was found win.version() [1] Windows 7 x64 (build 7600) R.version.string [1] R version 2.12.0 (2010-10-15) I also make comparison with R running on other Win7 64 and 32 bit VMs. The output looks more less the same. B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com Cc: r-help r-help@r-project.org Sent: Tue, November 30, 2010 12:54:54 AM Subject: Re: [R] Where is gdata? Hi Gabor, Please start at a fresh version of R. Copy and paste your session from the R console rather than relating what happened. Also, what version of gdata are you using? Older versions did not have installXLSXsupport. Show: packageDescription(gdata)$Version win.version() R.version.string packageDescription(gdata)$Version [1] 2.8.1 win.version() [1] Windows 7 x64 (build 7600) R.version.string [1] R version 2.12.0 (2010-10-15) Both 32 and 64 bits That is the correct version of gdata. I am using Windows 32 so there could be some differences due to that. At any rate, can you start a fresh R session and show the console output of the problems you have seen. Use Rgui --vanilla to start R to be sure you don't have anything else that might interfere and show everything including the R startup message in the R console output. -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[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.
Re: [R] Where is gdata?
Hi Gabor, Your virtual machine does not have gdata in its library. No. This virtual machine is running Oracle VBox as virtualizer with Ubunut 10.10 desktop 64bit as host. R is not installed on host. Even it has, host and VM won't interfere each another. Nor VMs would interfere amongst themselves. What I have done on this VM, having problem on R, was having removed and reinstalled R 2/3 times. Also I did heavy testing of R packages on it. It would be easier for me to delete this VM and restart testing R on another VM. I have spare VMs ready for this purpose. Because of curiosity I pursue finding the cause of problem in question nothing else. B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com Cc: r-help r-help@r-project.org Sent: Tue, November 30, 2010 10:18:25 AM Subject: Re: [R] Where is gdata? Hi Gabor, That is the correct version of gdata. I am using Windows 32 so there could be some differences due to that. At any rate, can you start a fresh R session and show the console output of the problems you have seen. Use Rgui --vanilla to start R to be sure you don't have anything else that might interfere and show everything including the R startup message in the R console output. Each time I start R clicking Rgui short-cut on Win7 desktop. In order to clear all residue I reboot Win7 and click Rgui short-cut to start R Output:- R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Loading required package: rcom Loading required package: rscproxy rcom requires a current version of statconnDCOM installed. To install statconnDCOM type installstatconnDCOM() This will download and install the current version of statconnDCOM You will need a working Internet connection because installation needs to download a file. [Previously saved workspace restored] It seems no complaint there. I start another Win7 64bit VM on this virtual machine (Remark: This is a virtual machine with 3 Win7,64bit, 1 Win7, 32bit, 2 Ubuntu 10.10,64 bit, 2 Debian 6, 64bit, etc. running. All VMs have R installed) evoke Rgui on desktop. Output: R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. The output looks same as previous one up to:- .. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. gdata not installed packageDescription(gdata)$Version Error in packageDescription(gdata)$Version : $ operator is invalid for atomic vectors In addition: Warning message: In packageDescription(gdata) : no package 'gdata' was found win.version() [1] Windows 7 x64 (build 7600) R.version.string [1] R version 2.12.0 (2010-10-15) I also make comparison with R running on other Win7 64 and 32 bit VMs. The output looks more less the same. Your virtual machine does not have gdata in its library. -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[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.
Re: [R] Where is gdata?
Hi Gabor, Your library may not be set to what you think it is. Try issuing this command to discover which libraries its using: .libPaths() [1] C:\\Users\\satimiswin764\\Documents/R/win-library/2.12 [2] C:/PROGRA~1/R/R-212~1.0/library and read the help for that command. Also try this: library() which will list each library and the packages in it. gdata is on; Packages in library 'C:\Users\satimiswin764\Documents/R/win-library/2.12': It is on user's library folder NOT on PROGRA library fold. B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com Cc: r-help r-help@r-project.org Sent: Tue, November 30, 2010 11:21:13 AM Subject: Re: [R] Where is gdata? Hi Gabor, Your virtual machine does not have gdata in its library. No. This virtual machine is running Oracle VBox as virtualizer with Ubunut 10.10 desktop 64bit as host. R is not installed on host. Even it has, host and VM won't interfere each another. Nor VMs would interfere amongst themselves. What I have done on this VM, having problem on R, was having removed and reinstalled R 2/3 times. Also I did heavy testing of R packages on it. It would be easier for me to delete this VM and restart testing R on another VM. I have spare VMs ready for this purpose. Because of curiosity I pursue finding the cause of problem in question nothing else. Your library may not be set to what you think it is. Try issuing this command to discover which libraries its using: .libPaths() and read the help for that command. Also try this: library() which will list each library and the packages in it. -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[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.
[R] Where is gdata?
Hi folks, Win 7 64 bit R 32 bit install.packages(gregmisc) Installing package(s) into âC:\Users\satimiswin764\Documents/R/win-library/2.12â (as âlibâ is unspecified) --- Please select a CRAN mirror for use in this session --- also installing the dependency âgmodelsâ trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/gmodels_2.15.0.zip' Content type 'application/zip' length 76016 bytes (74 Kb) opened URL downloaded 74 Kb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/gregmisc_2.1.1.zip' Content type 'application/zip' length 97482 bytes (95 Kb) opened URL downloaded 95 Kb package 'gmodels' successfully unpacked and MD5 sums checked package 'gregmisc' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\satimiswin764\AppData\Local\Temp\RtmpP3dNfa\downloaded_packages Installation went through without problem. library(gregmisc) Loading required package: gmodels Loading required package: gplots Loading required package: gtools Loading required package: caTools Loading required package: bitops Loading required package: grid Attaching package: 'gplots' The following object(s) are masked from 'package:stats': lowess Warning message: The `gregmisc' *package* has converted into a *bundle* containing four sub-packages: gdata, gtools, gmodels, and gplots. Please load these packages directly. library(gdata) gdata Error: object 'gdata' not found gdata() Error: could not find function gdata Please advise what mistake I have committed. TIA B.R. Stephen L [[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.
[R] Where to download R .xls sample files?
Hi folks, Which R packages containing sample .xls files? TIA B.R. Stephen L [[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.
Re: [R] How to remove a package.
Hi Stefan, Tks for your advice. detach(package:AER) data() Data sets in package âcarâ: detach(package:car) data() Data sets in package âdatasetsâ. I have to run detach twice getting back to package 'datasets' install.packages(Ecdat) Installing package(s) into âC:\Users\satimiswin764\Documents/R/win-library/2.12â (as âlibâ is unspecified) trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/Ecdat_0.1-6.zip' Content type 'application/zip' length 2817531 bytes (2.7 Mb) opened URL downloaded 2.7 Mb package 'Ecdat' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\satimiswin764\AppData\Local\Temp\RtmpP3dNfa\downloaded_packages d Package installed. Installation went through w/o problem. library(Ecdat) data() Data sets in package âdatasetsâ NOT 'Ecdat' ??Ecdat ... Ecdat::Caschool The California Test Score Data Set Ecdat::GrilichesWage Datas Ecdat::MCAS The Massashusets Test Score Data Set Ecdat::MunExp Municipal Expenditure Data Ecdat::Orange The Orange Juice Data Set Ecdat::SolowSolow's Technological Change Data Ecdat::TranspEq Statewide Data on Transportation Equipment Manufacturing Those files are in Ecdat packages. Caschool Error: object 'Caschool' not found MCAS Error: object 'MCAS' not found Please help. TIA B.R. Stephen L From: Stefan Grosse singularit...@gmx.net Sent: Sun, November 28, 2010 7:23:19 PM Subject: Re: [R] How to remove a package. Am 27.11.2010 09:48, schrieb Stephen Liu: I found the datasets of AER cool. detach(package:AER, unload = TRUE) detach(package:AER) works for me. data() still found car there. you mean cars ? This is not part of AER but in a base R installation. install.packages(EcDat) Where can I download/install EcDat? TIA It is case sensitive, try install.packages(Ecdat) it works for me... Maybe you should try a little bit more... hth Stefan [[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.
Re: [R] Where to download R .xls sample files?
Hi, why do you need .xls format data file? For learning. I found following video: http://www.youtube.com/watch?v=Hq0JmSnBX8Ifeature=mfu_in_orderlist=UL I need econdat.xls, Excel file B.R. Stephen L From: Jinsong Zhao jsz...@yeah.net To: r-help@r-project.org Sent: Sun, November 28, 2010 7:54:14 PM Subject: Re: [R] Where to download R .xls sample files? On 2010-11-28 19:46, Stephen Liu wrote: Hi folks, Which R packages containing sample .xls files? TIA why do you need .xls format data file? B.R. Stephen L __ 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. [[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.
Re: [R] How to remove a package.
Hi David, Thanks for your advice. I got it. But I can't resolve: library(AER) Loading required package: car Loading required package: MASS Loading required package: nnet Loading required package: survival Loading required package: splines Loading required package: Formula Loading required package: lmtest Loading required package: zoo Loading required package: sandwich Loading required package: strucchange data() displays Data sets in package âAERâ: But; library(Ecdat) data() displays Data sets in package âdatasetsâ: a large datasets including those in package Ecdat? NOt only Ecdat separately. B.R. Stephen L From: David Winsemius dwinsem...@comcast.net Cc: Stefan Grosse singularit...@gmx.net; r-help@r-project.org Sent: Sun, November 28, 2010 11:16:34 PM Subject: Re: [R] How to remove a package. On Nov 28, 2010, at 7:16 AM, Stephen Liu wrote: Hi Stefan, Tks for your advice. snipped Installation went through w/o problem. library(Ecdat) data() Data sets in package âdatasetsâ NOT 'Ecdat' ??Ecdat ... Ecdat::Caschool The California Test Score Data Set Ecdat::GrilichesWage Datas Ecdat::MCAS The Massashusets Test Score Data Set Ecdat::MunExp Municipal Expenditure Data Ecdat::Orange The Orange Juice Data Set Ecdat::SolowSolow's Technological Change Data Ecdat::TranspEq Statewide Data on Transportation Equipment Manufacturing Those files are in Ecdat packages. Caschool Error: object 'Caschool' not found MCAS Error: object 'MCAS' not found Because loading the package does not necessarily register the datasets: require(Ecdat) Loading required package: Ecdat data() #-- produces a large list including Car Stated Preferences for Car Choice Caschool The California Test Score Data Set Catsup Choice of Brand for Catsup CigarCigarette Consumption str(Caschool) Error in str(Caschool) : object 'Caschool' not found data(Car) str(Car) 'data.frame':4654 obs. of 70 variables: $ choice: Factor w/ 6 levels choice1,choice2,..: 1 2 5 5 5 5 2 5 5 2 ... $ college : num 0 1 0 0 0 0 1 1 0 1 ... $ hsg2 : num 0 1 1 0 1 0 1 0 0 0 ... Note that this dataset was NEVER spelled car. -- David. From: Stefan Grosse singularit...@gmx.net Sent: Sun, November 28, 2010 7:23:19 PM Subject: Re: [R] How to remove a package. Am 27.11.2010 09:48, schrieb Stephen Liu: I found the datasets of AER cool. detach(package:AER, unload = TRUE) detach(package:AER) works for me. data() still found car there. you mean cars ? This is not part of AER but in a base R installation. install.packages(EcDat) Where can I download/install EcDat? TIA It is case sensitive, try install.packages(Ecdat) it works for me... Maybe you should try a little bit more... hth Stefan [[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. David Winsemius, MD West Hartford, CT [[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.
Re: [R] Where is gdata?
Hi Spencer, I don't have RTools installed. Therefore I can't find RTools/perl library(RTools) Error in library(RTools) : there is no package called 'RTools' library(Ecdat) no complaint data() The datasets on Ecdat are added to the big list. However data(package='Ecdat') displays the datasets list of Ecdat B.R. Stephen L From: Spencer Graves spencer.gra...@structuremonitoring.com Sent: Mon, November 29, 2010 11:33:12 AM Subject: Re: [R] Where is gdata? Hi, Stephen: What operating system do you have? From the path you cite, I assume you are using some version of Windows. Wikipedia on perl says there are two primary version of perl for Windows Strawberry perl, which is free, open source, and ActivePerl, which is free but not open source. I've been using Strawberry perl without any apparent problems due to the version. When I removed ~Rtools/perl from my path, it still had Strawberry perl, and 'installXLSXsupport()' worked with my installation of Strawberry perl, when it had not worked with ~Rtools/perl. You can download Strawberry perl from http://strawberryperl.com;. However, RSiteSearch('strawberry perl') produced 0 matches, while RSiteSearch(ActivePerl) returned 2 matches and RSiteSearch(Active Perl) found 10 matches. After downloading and installing one of these, if 'installXLSXsupport()' still does not work, you need to check the path: If 'installXLSXsupport()' does not work with Strawberry perl as the first perl in your path, then you may need to install an appropriate package from CPAN. More than that, I cannot answer. However, if you download and install one of these two versions of perl and still have the problem, please report what you've done and they symptoms you get to this list. Also, please include sessionInfo() with your reply. Hope this helps. Spencer On 11/28/2010 6:38 PM, Stephen Liu wrote: Hi Spencer, Win 7 I can't find the folders RTools\perl perl is on C:\Users\satimis\My Document\R\win-library\2.12\gdata\perl Nor I can find the folder Strawberry perl. Can you help? TIA B.R. Stephen L From: Spencer Gravesspencer.gra...@structuremonitoring.com Sent: Mon, November 29, 2010 12:58:25 AM Subject: Re: [R] Where is gdata? Hi, Stephen: Have you solved the problem yet? If no, see below. Spencer ### Hello, All: Prof. Ripley suggested I remove RTools/perl from my path. I did that leaving Strawberry perl. Then everything seemed to work appropriately. Thanks to all. Spencer On 11/28/2010 7:49 AM, Gabor Grothendieck wrote: On Sun, Nov 28, 2010 at 10:40 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote: I tried install.packages('gregmisc'), which Stephen said he had. Then help(pac=gdata) seemed to work normally. However, when I then tried library(gdata), I got an error message from the the operating system, saying perl.exe has stopped working. I cancelled past that and got a message gdata: Unable to load perl libaries needed by read.xls() ... Run the function 'installXLSXsupport()'. I tried 'installXLSXsupport()' and again perl stopped working. I quit R and tried install.packages('gdata') again, and it killed perl again. Before installing 'gregmisc', I had tried install.packages('gdata') by itself. That seemed to work. Then I manually removed it and tried 'gregmisc', as Stephen had, and got problems I don't know how to solve. ??? Thanks, Spencer ## library(gdata) gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLX' (Excel 97-2004) files. gdata: Unable to load perl libaries needed by read.xls() gdata: to support 'XLSX' (Excel 2007+) files. gdata: Run the function 'installXLSXsupport()' gdata: to automatically download and install the perl gdata: libaries needed to support Excel XLS and XLSX formats. Read ?installXLSXsupport -- Spencer Graves, PE, PhD President and Chief Operating Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San José, CA 95126 ph: 408-655-4567 [[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.
Re: [R] Where is gdata?
Hi Gabor, library(gdata) no complaint library(help = gdata) It works. Thanks ?read.xls I must run ??read.xls All the topics I tested must use ??topic_name B.R. Stephen L From: Gabor Grothendieck ggrothendi...@gmail.com Cc: Spencer Graves spencer.gra...@structuremonitoring.com; r-help r-help@r-project.org Sent: Mon, November 29, 2010 1:16:35 PM Subject: Re: [R] Where is gdata? On Mon, Nov 29, 2010 at 12:06 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Regarding your question about gdata, 1. if gdata did not get installed then just do this from within R: install.packages(gdata) (or use the Packages | Install Package(s) menu to accomplish same). If that still does not result in gdata being installed then try a different mirror. 2. there is no gdata() function in the gdata package so your line which tries to call it would be expected to return an error even if gdata were present. 3. If you are not sure whether or not you have gdata installed try: library(gdata) If that works (i.e. you get no error message) then you have gdata installed and you can get help like this: library(help = gdata) and for each topic listed you can get help like this: ?read.xls and so on. -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com [[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.
[R] How to remove a package.
Hi folks, library(AER) data() I found the datasets of AER package. But I couldn't remove AER with: either detach(package:AER) or detach(package:AER, unload = TRUE) data() still found car there. What will be the correct way to remove it? TIA Besides:- I couldn't find EcDat library(EcDat) Error in library(EcDat) : there is no package called 'EcDat' library(Ecdat) data() It is the Data sets in package âdatasetsâ install.packages(EcDat) Installing package(s) into âC:\Users\satimis\Documents/R/win-library/2.12â (as âlibâ is unspecified) --- Please select a CRAN mirror for use in this session --- Warning messages: 1: In getDependencies(pkgs, dependencies, available, lib) : package âEcDatâ is not available 2: Perhaps you meant âEcdatâ ? Ecdat Error: object 'Ecdat' not found Ecdat can't be found? Where can I download/install EcDat? TIA B.R. Stephen L [[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.
[R] How to search the name of dataset on database
Hi folks, I can't figure out using help.search to find the name of the dataset on database. If it is NOT the right tool please advise which tool shall I use? TIA B.R. Stephen L [[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.
Re: [R] How to save a data set as .txt on fly?
Hi, He is telling you that it is not surprising that 'aaa' does not exist, if the object you saved was called DNase No, such a file. Just rechecked it with Win7 search command. (Win7 has been rebooted) Again - you need to use the name of the object which happens to be 'DNase' - not 'dnase', 'dnase.txt' or 'aaa' Thanks. I have this idea at the beginning. A further thought changed my mind. On R console DNase displays the content of the data set. If I save the file in the same name. It may confuse me on running DNase whether the output is the content of the data set OR from the file created. Other advice noted. Thanks B.R. Stephen L From: Philipp Pagel p.pa...@wzw.tum.de To: r-help@r-project.org Sent: Fri, November 26, 2010 5:07:40 PM Subject: Re: [R] How to save a data set as .txt on fly? On Thu, Nov 25, 2010 at 09:23:17PM -0800, Stephen Liu wrote: Hi David, But you didn't try: DNase# which was after all the name of the object you saved. Sorry I don't follow. He is telling you that it is not surprising that 'aaa' does not exist, if the object you saved was called DNase I can't do it with following steps: DNase save(DNase, file=C:/Users/satimis/Documents/dnase.txt) load(file=C:/Users/satimis/Documents/dnase.txt) dnase Error: object 'dnase' not found dnase.txt Error: object 'dnase.txt' not found Again - you need to use the name of the object which happens to be 'DNase' - not 'dnase', 'dnase.txt' or 'aaa' I'm curious to know why the .txt file created in this way can't be read with Notpad and WordPad? It can be read with them - only it does not look the way you expected. If you want to export data for use in other software funcitons like write.table may be of interest to you. Load and save are meant for use in R, only. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ __ 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. [[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.
[R] How to add multiple ablines
Hi folks Run; ToothGrowth attach(ToothGrowth) toothgrowth=lm(len~dose) adding abline: abline(toothgrowth) I got it done adding single abline. How to add more ablines on the same diagram? I found following thread, applying mapply command; Plotting multiple ablines http://www.mail-archive.com/r-help@r-project.org/msg51543.html mapply(abline, (converge$kY + tan((90-converge$kT) * pi / 180)*(-converge$kX)), tan((90-converge$kT) * pi / 180)) But couldn't resolve it. Substituting converge with toothgrowth didn't work? I also look at ?mapply. Pls help. I don't have parameter of other ablines to be added. This is only a learning example. Any data can fit to them. TIA B.R. Stephen L [[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.
Re: [R] How to add multiple ablines
Hi jim, Tks for your advice. I got it. 1) abline(v=c(1,2,3,4), h=c(10,20), toothgrowth) The output of following command is the same. abline(v=c(1,2), h=c(10,20), toothgrowth) 2) Afterwards can I add further abline? B.R. Stephen L From: jim holtman jholt...@gmail.com Cc: r-help@r-project.org Sent: Sat, November 27, 2010 2:07:41 PM Subject: Re: [R] How to add multiple ablines just add more 'abline' calls, or pass multiple values; e.g., abline(v=c(1,2,3,4), h=c(10,20)) Hi folks Run; ToothGrowth attach(ToothGrowth) toothgrowth=lm(len~dose) adding abline: abline(toothgrowth) I got it done adding single abline. How to add more ablines on the same diagram? I found following thread, applying mapply command; Plotting multiple ablines http://www.mail-archive.com/r-help@r-project.org/msg51543.html mapply(abline, (converge$kY + tan((90-converge$kT) * pi / 180)*(-converge$kX)), tan((90-converge$kT) * pi / 180)) But couldn't resolve it. Substituting converge with toothgrowth didn't work? I also look at ?mapply. Pls help. I don't have parameter of other ablines to be added. This is only a learning example. Any data can fit to them. TIA B.R. Stephen L [[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. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[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.
[R] About searching criteria
Hi folks, I need to search the dataset on data with name on heading; Run conc density I look at ??help.search and could not resolve; help.search(pattern, fields = c(alias, concept, title) What shall I replace pattern? I suppose replacing alias, concept, title with Run, conc, density ? Please help. TIA B.R. Stephen L __ 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] About searching criteria
Hi Henrique, Lot of thanks for your advice which is a little complicate to me. It involves multiple R commands: d - data() ne - new.env() data(list = grep(\\(, d$results[,'Item'], value = TRUE, invert = TRUE), envir = ne) out - eapply(ne, names) names(which(lapply(lapply(out, '%in%', c(Run, conc, density)), sum) == 3)) [1] DNase DNase Runconc density 1 1 0.04882812 0.017 2 1 0.04882812 0.018 3 1 0.19531250 0.121 4 1 0.19531250 0.124 ... It works for me. grep - is simliar to sh command grep, egrep, fgrep, rgrep - print lines matching a pattern which - differs from sh command which - locate a command Wonderful !!! B.R. Stephen L From: Henrique Dallazuanna www...@gmail.com Cc: r-help@r-project.org Sent: Fri, November 26, 2010 12:35:23 AM Subject: Re: [R] About searching criteria Try this: d - data() ne - new.env() data(list = grep(\\(, d$results[,'Item'], value = TRUE, invert = TRUE), envir = ne) out - eapply(ne, names) names(which(lapply(lapply(out, '%in%', c(Run, conc, density)), sum) == 3)) Hi folks, I need to search the dataset on data with name on heading; Run conc density I look at ??help.search and could not resolve; help.search(pattern, fields = c(alias, concept, title) What shall I replace pattern? I suppose replacing alias, concept, title with Run, conc, density ? Please help. TIA B.R. Stephen L __ 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]] __ 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] How to save a data set as .txt on fly?
Hi folks, Win7 64bit I tried to save DNase, a data set on database, as .txt file for future use with load. I can't do it on fly; save(DNase, file=C:/Users/satimis/Documents/aaa.txt) load(file=C:/Users/satimis/Documents/aaa.txt) aaa Error: object 'aaa' not found aaa.txt Error: object 'aaa.txt' not found I must perform following steps; aaa-DNase save(aaa, file=C:/Users/satimis/Documents/aaa.txt) load(file=C:/Users/satimis/Documents/aaa.txt) aaa Runconc density 1 1 0.04882812 0.017 2 1 0.04882812 0.018 3 1 0.19531250 0.121 Is there any way doing it on fly? Besides aaa.txt can't be read direct with Notepad nor WordPad TIA B.R. Stephen L __ 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] How to save a data set as .txt on fly?
Hi David, But you didn't try: DNase# which was after all the name of the object you saved. Sorry I don't follow. I can't do it with following steps: DNase save(DNase, file=C:/Users/satimis/Documents/dnase.txt) load(file=C:/Users/satimis/Documents/dnase.txt) dnase Error: object 'dnase' not found dnase.txt Error: object 'dnase.txt' not found sink command can make it sink(dnase.txt, append=TRUE, split=TRUE) DNase sink() to load the file read.table(file=C:/Users/satimis/Documents/dnase.txt) Besides the file created can be read with Notpad and WordPad Does the above method (typing the name of the save object rather than the file name) meet your definition of on the fly? Could you pls explain in more detail? Thanks Right. Try reading the Posting Guide which among many other useful things has a method for saving objects in text format. Yes. I'm curious to know why the .txt file created in this way can't be read with Notpad and WordPad? B.R. Stephen L - Original Message From: David Winsemius dwinsem...@comcast.net To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Fri, November 26, 2010 11:56:23 AM Subject: Re: [R] How to save a data set as .txt on fly? On Nov 25, 2010, at 10:45 PM, Stephen Liu wrote: Hi folks, Win7 64bit I tried to save DNase, a data set on database, as .txt file for future use with load. I can't do it on fly; save(DNase, file=C:/Users/satimis/Documents/aaa.txt) load(file=C:/Users/satimis/Documents/aaa.txt) aaa Error: object 'aaa' not found aaa.txt Error: object 'aaa.txt' not found But you didn't try: DNase# which was after all the name of the object you saved. I must perform following steps; aaa-DNase save(aaa, file=C:/Users/satimis/Documents/aaa.txt) load(file=C:/Users/satimis/Documents/aaa.txt) aaa Runconc density 1 1 0.04882812 0.017 2 1 0.04882812 0.018 3 1 0.19531250 0.121 Is there any way doing it on fly? Does the above method (typing the name of the save object rather than the file name) meet your definition of on the fly? Besides aaa.txt can't be read direct with Notepad nor WordPad Right. Try reading the Posting Guide which among many other useful things has a method for saving objects in text format. TIA B.R. Stephen L __ 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. David Winsemius, MD West Hartford, CT __ 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] About available datasets on PC
Hi folks, Win7 On running; data(package = .packages(all.available = TRUE)) it displays a list of datasets under:- Data sets in package ‘AER’: But I couldn't call/load all of them on the list. DJFranses Error: object 'DJFranses' not found CreditCard Error: object 'CreditCard' not found But I can call/load; iris Whether the list shows all available datasets on repo, NOT the datasets already download/installed on PC? If YES how to find the running/available datasets on PC? Packages - Load Datasets the list looks different. Pls advise. TIA B.R. Stephen L __ 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] About available datasets on PC
Hi Jeff, Tks for your advice. I got it B.R. satimis - Original Message From: Jeff Newmiller jdnew...@dcn.davis.ca.us To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Tue, November 23, 2010 4:41:57 PM Subject: Re: [R] About available datasets on PC You need to load the package and then load the data: library(AER) data(DJFranses) then it will be available for you to work with. Stephen Liu wrote: Hi folks, Win7 On running; data(package = .packages(all.available = TRUE)) it displays a list of datasets under:- Data sets in package ‘AER’: But I couldn't call/load all of them on the list. DJFranses Error: object 'DJFranses' not found CreditCard Error: object 'CreditCard' not found But I can call/load; iris Whether the list shows all available datasets on repo, NOT the datasets already download/installed on PC? If YES how to find the running/available datasets on PC? Packages - Load Datasets the list looks different. Pls advise. TIA B.R. Stephen L __ 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-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] Searching dataset
Hi folks, help.search(item_name) displays a list of dataset containing the item_name. If I need to search containing more than one item_name. What will be the command TIA B.R. Stephen L __ 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] How to bold items on a data frame?
Hi folks, I ran following commands to create a data file: Year - c(1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990) Yield - c(60, 50, 70, 70, 80, 50, 60, 40) Concentration% - c(30, 40, 50, 60, 70, 80, 90, 100) Temperature - c(56, 47, 53, 53, 56, 47, 44, 44) datafile - data.frame(Year,Yield,Concentration,Temperature) Please advise how to bold the items, Year/Yield/etc. TIA B.R. Stephen L __ 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] Rexcel
Hi, For RExcel I would suggest subscribing; http://mailman.csd.univie.ac.at/listinfo/rcom-l They have a website on; http://rcom.univie.ac.at/ B.R. Stephen L - Original Message From: Luis Felipe Parra felipe.pa...@quantil.com.co To: r-help r-help@r-project.org Sent: Mon, November 22, 2010 8:11:39 PM Subject: [R] Rexcel Hello I am new to RExcel and I would like to run a source code form the excel worksheet. I would like to run the following code source(C:\\Quantil Aplicativos\\Genercauca\\BackwardSelectionNC.r) from the excel wroksheet. Does anybody know how to do this? Thank you Felipe Parra [[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. __ 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] How to start default browser on R
Hi folks, Win7 64 bit IE 64 bit How to start IE on R? TIA B.R. Stephen L __ 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] How to start default browser on R
Hi David, Thanks for your advice. According to the Example on ?browseURL I tried: 1) browseURL(file:http://www.r-project.org;, browser=C:/Program Files/Internet Explorer/iexplore.exe) It starts a small windows asking for permission to accept ActiveX - OK IE doesn't start 2) browseURL(file:http://d:/R/R-2.5.1/html/index.html;, browser=C:/Program Files/Internet Explorer/iexplore.exe) same result as 1) above What I have missed? TIA B.R. Stephen L - Original Message From: David Scott d.sc...@auckland.ac.nz To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Tue, November 23, 2010 10:16:04 AM Subject: Re: [R] How to start default browser on R On 23/11/10 14:20, Stephen Liu wrote: Hi folks, Win7 64 bit IE 64 bit How to start IE on R? TIA B.R. Stephen L ?browseURL -- _ David ScottDepartment of Statistics The University of Auckland, PB 92019 Auckland 1142,NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email:d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 Director of Consulting, Department of Statistics __ 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] How to start default browser on R
Hi Ista, I see. Your advice works. Thanks even without: browser=C:/Program Files/Internet Explorer/iexplore.exe) For non default browser it needs; browser=C:/Program Files/Mozilla Firefoe/firefox.exe What will be file: used for? B.R. Stephen L - Original Message From: Ista Zahn iz...@psych.rochester.edu To: Stephen Liu sati...@yahoo.com Cc: David Scott d.sc...@auckland.ac.nz; r-help@r-project.org r-help@r-project.org Sent: Tue, November 23, 2010 11:39:15 AM Subject: Re: [R] How to start default browser on R Hi Stephen, I'm not sure if this is the problem, but you almost certainly do not want the file: part. Try browseURL(http://www.r-project.org;) -Ista On Mon, Nov 22, 2010 at 10:26 PM, Stephen Liu sati...@yahoo.com wrote: Hi David, Thanks for your advice. According to the Example on ?browseURL I tried: 1) browseURL(file:http://www.r-project.org;, browser=C:/Program Files/Internet Explorer/iexplore.exe) It starts a small windows asking for permission to accept ActiveX - OK IE doesn't start 2) browseURL(file:http://d:/R/R-2.5.1/html/index.html;, browser=C:/Program Files/Internet Explorer/iexplore.exe) same result as 1) above What I have missed? TIA B.R. Stephen L - Original Message From: David Scott d.sc...@auckland.ac.nz To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Tue, November 23, 2010 10:16:04 AM Subject: Re: [R] How to start default browser on R On 23/11/10 14:20, Stephen Liu wrote: Hi folks, Win7 64 bit IE 64 bit How to start IE on R? TIA B.R. Stephen L ?browseURL -- _ David ScottDepartment of Statistics The University of Auckland, PB 92019 Auckland 1142,NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email:d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 Director of Consulting, Department of Statistics __ 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. -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org __ 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] How to start default browser on R
Hi David, I see. File: gives the full path to the .html file created/download. Then the browser will open that file. Thanks. I don't have hwriter package installed. A side question, what will be the corresponding command on R for check whether a package already installed? similar to; On R (Windows) Packages - Load package B.R. Stephen L - Original Message From: David Scott d.sc...@auckland.ac.nz To: Stephen Liu sati...@yahoo.com Cc: Ista Zahn iz...@psych.rochester.edu; r-help@r-project.org r-help@r-project.org Sent: Tue, November 23, 2010 12:00:36 PM Subject: Re: [R] How to start default browser on R On 23/11/10 16:59, Stephen Liu wrote: Hi Ista, I see. Your advice works. Thanks even without: browser=C:/Program Files/Internet Explorer/iexplore.exe) For non default browser it needs; browser=C:/Program Files/Mozilla Firefoe/firefox.exe What will be file: used for? B.R. Stephen L You can use it to open a local file on your machine as well. I use this all the time with hwriter which writes html reports. David Scott -- _ David ScottDepartment of Statistics The University of Auckland, PB 92019 Auckland 1142,NEW ZEALAND Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055 Email:d.sc...@auckland.ac.nz, Fax: +64 9 373 7018 Director of Consulting, Department of Statistics __ 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] Problem on running update
Hi Martin, Thanks for your advice. Ran following code on R-2.12.0 32bit as admin for(lib in .libPaths()) { + descs - Sys.glob(file.path(lib, *, DESCRIPTION)) + sizes - file.info(descs)$size + names(sizes) - descs + print(sizes[sizes 100]) + } named numeric(0) named numeric(0) Where are the above files? B.R. Stephen L - Original Message From: Martin Morgan mtmor...@fhcrc.org To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 21, 2010 2:10:52 PM Subject: Re: [R] Problem on running update On 11/20/2010 08:56 PM, Stephen Liu wrote: Hi folks, Win 7 64bit R 2.12.) Today on running: update.packages() Error: subscript out of bounds Unable to proceed. I have been googling around and couldn't discover the cause. Pls help. TIA Hi Stephen -- maybe https://stat.ethz.ch/pipermail/r-help/2010-November/259912.html Martin B.R. Stephen L __ 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. -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 __ 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] Problem on running update
Hi Martin, Thanks for your advice. This is my first time hunting for cause of error on R. Steps performed as follows; Sys.glob(file.path(.libPaths()[1], *, DESCRIPTION)) [1] C:\\Users\\satimis\\Documents/R/win-library/2.12/Ecdat/DESCRIPTION [2] C:\\Users\\satimis\\Documents/R/win-library/2.12/RColorBrewer/DESCRIPTION [3] C:\\Users\\satimis\\Documents/R/win-library/2.12/Rglpk/DESCRIPTION [4] C:\\Users\\satimis\\Documents/R/win-library/2.12/akima/DESCRIPTION [5] C:\\Users\\satimis\\Documents/R/win-library/2.12/bitops/DESCRIPTION [6] C:\\Users\\satimis\\Documents/R/win-library/2.12/caTools/DESCRIPTION [7] C:\\Users\\satimis\\Documents/R/win-library/2.12/cubature/DESCRIPTION [8] C:\\Users\\satimis\\Documents/R/win-library/2.12/degreenet/DESCRIPTION [9] C:\\Users\\satimis\\Documents/R/win-library/2.12/ergm/DESCRIPTION [10] C:\\Users\\satimis\\Documents/R/win-library/2.12/fBasics/DESCRIPTION [11] C:\\Users\\satimis\\Documents/R/win-library/2.12/gam/DESCRIPTION [12] C:\\Users\\satimis\\Documents/R/win-library/2.12/gdata/DESCRIPTION [13] C:\\Users\\satimis\\Documents/R/win-library/2.12/gplots/DESCRIPTION [14] C:\\Users\\satimis\\Documents/R/win-library/2.12/gtools/DESCRIPTION [15] C:\\Users\\satimis\\Documents/R/win-library/2.12/kinship/DESCRIPTION [16] C:\\Users\\satimis\\Documents/R/win-library/2.12/latentnet/DESCRIPTION [17] C:\\Users\\satimis\\Documents/R/win-library/2.12/logspline/DESCRIPTION [18] C:\\Users\\satimis\\Documents/R/win-library/2.12/maxLik/DESCRIPTION [19] C:\\Users\\satimis\\Documents/R/win-library/2.12/miscTools/DESCRIPTION [20] C:\\Users\\satimis\\Documents/R/win-library/2.12/network/DESCRIPTION [21] C:\\Users\\satimis\\Documents/R/win-library/2.12/numDeriv/DESCRIPTION [22] C:\\Users\\satimis\\Documents/R/win-library/2.12/nws/DESCRIPTION [23] C:\\Users\\satimis\\Documents/R/win-library/2.12/rgdal/DESCRIPTION [24] C:\\Users\\satimis\\Documents/R/win-library/2.12/rgenoud/DESCRIPTION [25] C:\\Users\\satimis\\Documents/R/win-library/2.12/rlecuyer/DESCRIPTION [26] C:\\Users\\satimis\\Documents/R/win-library/2.12/rsprng/DESCRIPTION [27] C:\\Users\\satimis\\Documents/R/win-library/2.12/sem/DESCRIPTION [28] C:\\Users\\satimis\\Documents/R/win-library/2.12/shapes/DESCRIPTION [29] C:\\Users\\satimis\\Documents/R/win-library/2.12/slam/DESCRIPTION [30] C:\\Users\\satimis\\Documents/R/win-library/2.12/snow/DESCRIPTION [31] C:\\Users\\satimis\\Documents/R/win-library/2.12/snowFT/DESCRIPTION [32] C:\\Users\\satimis\\Documents/R/win-library/2.12/statmod/DESCRIPTION [33] C:\\Users\\satimis\\Documents/R/win-library/2.12/statnet/DESCRIPTION [34] C:\\Users\\satimis\\Documents/R/win-library/2.12/tripack/DESCRIPTION [35] C:\\Users\\satimis\\Documents/R/win-library/2.12/trust/DESCRIPTION [36] C:\\Users\\satimis\\Documents/R/win-library/2.12/tweedie/DESCRIPTION traceback() 5: .readPkgDesc(lib, fields) 4: installed.packages(lib.loc = lib.loc) 3: NROW(instPkgs) 2: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, available = available, checkBuilt = checkBuilt) 1: update.packages(repos = http://cran.r-project.org;) Enter a frame number, or 0 to exit options(error=recover) update.packages(repos=http://cran.r-project.org;) 1: update.packages(repos = http://cran.r-project.org;) 2: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, a 3: NROW(instPkgs) 4: installed.packages(lib.loc = lib.loc) 5: .readPkgDesc(lib, fields) Selection: 1 Called from: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, available = available, checkBuilt = checkBuilt) Browse[1] ?browser starting httpd help server ... done Browser[1] ?recover Looked at them and wondered what to do next? B.R. Stephen L - Original Message From: Martin Morgan mtmor...@fhcrc.org To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, November 22, 2010 1:30:29 AM Subject: Re: [R] Problem on running update On 11/21/2010 03:12 AM, Stephen Liu wrote: Hi Martin, Thanks for your advice. Ran following code on R-2.12.0 32bit as admin for(lib in .libPaths()) { + descs - Sys.glob(file.path(lib, *, DESCRIPTION)) + sizes - file.info(descs)$size + names(sizes) - descs + print(sizes[sizes 100]) + } named numeric(0) named numeric(0) Where are the above files? If your problem was as a regular user, then run the above code as regular user not admin. Not sure what 'the above files' are that you are looking for; the 'named numeric(0)' says that no packages have DESCRIPTION files with size 100; the loop looked in all directories in .libPaths() for a subdirectory with file DESCRIPTION; you can find these by for instance Sys.glob(file.path(.libPaths()[1], *, DESCRIPTION)) Your next step is to identify where
Re: [R] Problem on running update
Hi Martin, Sorry I can't fix the update problem. Reading ?browser and ?recover didn't help me out. Finally I uninstalled R, 32/64 bit and RExcel and made a fresh installation of them. Remark: I need to remove all folders with connection to them. Otherwise after installing R, RExcel, rcom, statconnDCOM, R-commander, etc. I still encountered the same problem. After reinstalling above packages ran R as admin, update.packages() --- Please select a CRAN mirror for use in this session --- cluster : Version 1.13.1 installed in C:/PROGRA~1/R/R-212~1.0/library Version 1.13.2 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y codetools : Version 0.2-2 installed in C:/PROGRA~1/R/R-212~1.0/library Version 0.2-5 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y Matrix : Version 0.999375-44 installed in C:/PROGRA~1/R/R-212~1.0/library Version 0.999375-45 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y mgcv : Version 1.6-2 installed in C:/PROGRA~1/R/R-212~1.0/library Version 1.7-2 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y rpart : Version 3.1-46 installed in C:/PROGRA~1/R/R-212~1.0/library Version 3.1-47 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y survival : Version 2.35-8 installed in C:/PROGRA~1/R/R-212~1.0/library Version 2.36-1 available at http://cran.ms.unimelb.edu.au Update (y/N/c)? y trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/cluster_1.13.2.zip' Content type 'application/zip' length 370152 bytes (361 Kb) opened URL downloaded 361 Kb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/codetools_0.2-5.zip' Content type 'application/zip' length 42584 bytes (41 Kb) opened URL downloaded 41 Kb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/Matrix_0.999375-45.zip' Content type 'application/zip' length 3224889 bytes (3.1 Mb) opened URL downloaded 3.1 Mb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/mgcv_1.7-2.zip' Content type 'application/zip' length 894436 bytes (873 Kb) opened URL downloaded 873 Kb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/rpart_3.1-47.zip' Content type 'application/zip' length 191611 bytes (187 Kb) opened URL downloaded 187 Kb trying URL 'http://cran.ms.unimelb.edu.au/bin/windows/contrib/2.12/survival_2.36-1.zip' Content type 'application/zip' length 2619051 bytes (2.5 Mb) opened URL downloaded 2.5 Mb package 'cluster' successfully unpacked and MD5 sums checked package 'codetools' successfully unpacked and MD5 sums checked package 'Matrix' successfully unpacked and MD5 sums checked package 'mgcv' successfully unpacked and MD5 sums checked package 'rpart' successfully unpacked and MD5 sums checked package 'survival' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\satimiswin764\AppData\Local\Temp\RtmpM8LYDq\downloaded_packages Update is now working. Lot of thanks for your detail advice and time spent. B.R. Stephen L - Original Message From: Martin Morgan mtmor...@fhcrc.org To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, November 22, 2010 10:55:20 AM Subject: Re: [R] Problem on running update On 11/21/2010 05:21 PM, Stephen Liu wrote: Hi Martin, Thanks for your advice. This is my first time hunting for cause of error on R. Hi Stephen -- read the help pages ?browser, ?recover *before* trying to use the commands ... ?browser ?recover Steps performed as follows; Sys.glob(file.path(.libPaths()[1], *, DESCRIPTION)) [1] C:\\Users\\satimis\\Documents/R/win-library/2.12/Ecdat/DESCRIPTION [2] C:\\Users\\satimis\\Documents/R/win-library/2.12/RColorBrewer/DESCRIPTION [snip] [36] C:\\Users\\satimis\\Documents/R/win-library/2.12/tweedie/DESCRIPTION traceback() 5: .readPkgDesc(lib, fields) 4: installed.packages(lib.loc = lib.loc) 3: NROW(instPkgs) 2: old.packages(lib.loc = lib.loc, contriburl = contriburl, method = method, available = available, checkBuilt = checkBuilt) 1: update.packages(repos = http://cran.r-project.org;) Enter a frame number, or 0 to exit This says that the error occurred in the .readPkgDesc function; likely one of your package 'DESCRIPTION' files is corrupt. Take a look at the source of .readPkgDesc: utils:::.readPkgDesc function (lib, fields, pkgs = list.files(lib)) { ret - matrix(NA_character_, length(pkgs), 2L + length(fields)) for (i in seq_along(pkgs)) { pkgpath - file.path(lib, pkgs[i]) if (file.access(pkgpath, 5L)) next pkgpath - file.path(pkgpath, DESCRIPTION) if (file.access(pkgpath, 4L)) next desc - tryCatch(read.dcf(pkgpath, fields = fields), error = identity) if (inherits(desc, error) || NROW(desc) 1L) { warning(gettextf(read.dcf() error on file '%s', pkgpath), domain = NA
Re: [R] An empty grey diagram
Hi Josh and David, Problem solved. Both following steps work. 1) ToothGrowth attach(ToothGrowth) plot(dose,len) # this step is needed. Don't close the diagram. Otherwise following command won't work. matrics=lm(len~dose) abline(matrics) Graph displayed 2) ToothGrowth attach(ToothGrowth) plot(dose, len) # this step is needed. Don't close the diagram. Otherwise following command won't work. abline(lm(len ~ dose, data = ToothGrowth)) Graph displayed B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 1:39:45 PM Subject: Re: [R] An empty grey diagram On Fri, Nov 19, 2010 at 9:35 PM, Stephen Liu sati...@yahoo.com wrote: Hi David, What happens when you follow the directions... i.e. type: plot.new()#??? abline(lm(len ~ dose, data = ToothGrowth)) plot.new() The grey background changes to white, still an empty graph You cannot just use abline() on an empty graphic (well, you can but you get an empty graph). Please actually run my code, it will create a scatter plot, then add a line. Do not close the graphic device in between. with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) __ 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] (no subject)
Hi folks, Please advise where can I down free data files for learning R? Google search brought me many, not easy for to screen. TIA B.R. Stephen L __ 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] (no subject)
Hi Michael, Thanks for your advice. data() only displays a list of files. Is there an easy to show the brief summary of files rather than calling each file. Besides I need the files on Excel format/extension. Where can I find them? TIA B.R. Stephen L - Original Message From: Michael Bedward michael.bedw...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 5:46:35 PM Subject: Re: [R] (no subject) Type data() to list the numerous example data sets included with the standard R distribution. Michael On 20 November 2010 20:42, Stephen Liu sati...@yahoo.com wrote: Hi folks, Please advise where can I down free data files for learning R? Google search brought me many, not easy for to screen. TIA B.R. Stephen L __ 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-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] Import and export .xls
Hi folks, Whether I need following package to export R data to Excel spreadsheet and to import .xls file to R? xlsReadWrite http://www2.warwick.ac.uk/fac/sci/moac/degrees/modules/ch923/r_introduction/excel_in_r/ TIA B.R. Stephen L __ 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] Import and export .xls
Hi Gabor Thanks for your advice and URL Win 7 64 bit login as user I found following script:- [R] Excel Export in a beauty way https://stat.ethz.ch/pipermail/r-help/2009-June/200607.html Ran the script on R. After finish executed:- export.xls(iris) It seemed creating iris.xls on the fly. But I can't find it after finish. Can you help? If the script works how to save it for future use? TIA B.R. Stephen L - Original Message From: Gabor Grothendieck ggrothendi...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 11:58:49 PM Subject: Re: [R] Import and export .xls On Sat, Nov 20, 2010 at 10:53 AM, Stephen Liu sati...@yahoo.com wrote: Whether I need following package to export R data to Excel spreadsheet and to import .xls file to R? xlsReadWrite http://www2.warwick.ac.uk/fac/sci/moac/degrees/modules/ch923/r_introduction/excel_in_r/ / Yes, you can use that or a number of other packages to move data between R and Excel. See: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.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] problem on installing package
Hi folks, install.packages(RthroughExcelWorkbooksInstaller) Installing package(s) into ‘C:\Users\satimiswin764\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- Error: subscript out of bounds install.packages() Installing package(s) into ‘C:\Users\satimiswin764\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) Error: subscript out of bounds The package is there. .libPaths() [1] C:\\Users\\satimis\\Documents/R/win-library/2.12 [2] C:/PROGRA~1/R/R-212~1.0/library It seems having problem on folder path with \\ Pls advise how to rectify it? TIA B.R. Stephen L __ 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] Problem on running update
Hi folks, Win 7 64bit R 2.12.) Today on running: update.packages() Error: subscript out of bounds Unable to proceed. I have been googling around and couldn't discover the cause. Pls help. TIA B.R. Stephen L __ 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] An empty grey diagram
Hi folks, Win7 64bit R 1.12.0 I run following command on R:- ToothGrowth attach(ToothGrowth) plot(dose,len) matrics=lm(len~dose) abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content plot(abline(metrics)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet With the same result. Pls advise what does it mean? How to rectify it? TIA B.R. Stephen L __ 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] An empty grey diagram
Hi Josh, sessionInfo() R version 2.12.0 (2010-10-15) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] rcom_2.2-3.1 rscproxy_1.3-1 loaded via a namespace (and not attached): [1] tools_2.12.0 58 27.3 OJ 2.0 59 29.4 OJ 2.0 60 23.0 OJ 2.0 abline(lm(len~dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet sessioninfo() Error: could not find function sessioninfo capabilities() jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE FALSE TRUE TRUE TRUE TRUE FALSE B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 12:29:07 PM Subject: Re: [R] An empty grey diagram Hi Stephen, In a session where that code returns an error, can you report the full results of: sessionInfo() capabilities() ? Josh On Fri, Nov 19, 2010 at 8:14 PM, Stephen Liu sati...@yahoo.com wrote: Hi Josh, with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) ToothGrowth abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet ToothGrowth attach(ToothGrowth) abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Sorry, still fail only an empty grey background diagram displayed. B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 10:50:42 AM Subject: Re: [R] An empty grey diagram Hi Stephen, Please try: with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) Cheers, Josh On Fri, Nov 19, 2010 at 6:44 PM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Win7 64bit R 1.12.0 I run following command on R:- ToothGrowth attach(ToothGrowth) plot(dose,len) matrics=lm(len~dose) abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content plot(abline(metrics)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet With the same result. Pls advise what does it mean? How to rectify it? TIA B.R. Stephen L __ 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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.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] An empty grey diagram
Hi Josh, with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) ToothGrowth abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet ToothGrowth attach(ToothGrowth) abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Sorry, still fail only an empty grey background diagram displayed. B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 10:50:42 AM Subject: Re: [R] An empty grey diagram Hi Stephen, Please try: with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) Cheers, Josh On Fri, Nov 19, 2010 at 6:44 PM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Win7 64bit R 1.12.0 I run following command on R:- ToothGrowth attach(ToothGrowth) plot(dose,len) matrics=lm(len~dose) abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content plot(abline(metrics)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet With the same result. Pls advise what does it mean? How to rectify it? TIA B.R. Stephen L __ 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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.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] An empty grey diagram
Hi David, What happens when you follow the directions... i.e. type: plot.new()#??? abline(lm(len ~ dose, data = ToothGrowth)) plot.new() The grey background changes to white, still an empty graph If continue on my version:- abline(matrics) plot(matrics$resid) It plots a graph B.R. Stephen L - Original Message From: David Winsemius dwinsem...@comcast.net To: Stephen Liu sati...@yahoo.com Cc: Joshua Wiley jwiley.ps...@gmail.com; r-help@r-project.org Sent: Sat, November 20, 2010 1:08:21 PM Subject: Re: [R] An empty grey diagram On Nov 19, 2010, at 11:14 PM, Stephen Liu wrote: Hi Josh, with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) ToothGrowth abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet ToothGrowth attach(ToothGrowth) abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet What happens when you follow the directions... i.e. type: plot.new()#??? Sorry, still fail only an empty grey background diagram displayed. B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 10:50:42 AM Subject: Re: [R] An empty grey diagram Hi Stephen, Please try: with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) Cheers, Josh On Fri, Nov 19, 2010 at 6:44 PM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Win7 64bit R 1.12.0 I run following command on R:- ToothGrowth attach(ToothGrowth) plot(dose,len) matrics=lm(len~dose) abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content plot(abline(metrics)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet With the same result. Pls advise what does it mean? How to rectify it? TIA B.R. Stephen L __ 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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.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. David Winsemius, MD West Hartford, CT __ 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] An empty grey diagram
Hi Josh, plot.new() the gray background changes to white colour. If following my steps:- plot(matrics$resid) plots a new graph B.R. Stephen - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 12:57:41 PM Subject: Re: [R] An empty grey diagram It looks like all the packages you should need are loaded. Does the call to plot() create a scatter plot correctly? abline() adds a line to the current plot so that device still needs to be open when you call abline() (which it should have been if you ran the code from my first email). If a graphic device does not start when you call plot() then your error is earlier and you may need to explicitly open one (as David suggested). On Fri, Nov 19, 2010 at 8:38 PM, Stephen Liu sati...@yahoo.com wrote: Hi Josh, sessionInfo() R version 2.12.0 (2010-10-15) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] rcom_2.2-3.1 rscproxy_1.3-1 loaded via a namespace (and not attached): [1] tools_2.12.0 58 27.3 OJ 2.0 59 29.4 OJ 2.0 60 23.0 OJ 2.0 abline(lm(len~dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet abline(lm(len ~ dose, data = ToothGrowth)) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet sessioninfo() Error: could not find function sessioninfo capabilities() jpeg png tifftcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUEFALSEFALSE TRUE TRUE libxml fifo clediticonv NLS profmemcairo TRUEFALSE TRUE TRUE TRUE TRUEFALSE B.R. Stephen L __ 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] An empty grey diagram
ToothGrowth attach(ToothGrowth) abline(lm(len ~ does, data = ToothGrowth)) an empty gray graph displayed continue plot.new() the background changes to white colour, still an empty graph B.R. satimis - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 20, 2010 1:39:45 PM Subject: Re: [R] An empty grey diagram On Fri, Nov 19, 2010 at 9:35 PM, Stephen Liu sati...@yahoo.com wrote: Hi David, What happens when you follow the directions... i.e. type: plot.new()#??? abline(lm(len ~ dose, data = ToothGrowth)) plot.new() The grey background changes to white, still an empty graph You cannot just use abline() on an empty graphic (well, you can but you get an empty graph). Please actually run my code, it will create a scatter plot, then add a line. Do not close the graphic device in between. with(ToothGrowth, plot(dose, len)) abline(lm(len ~ dose, data = ToothGrowth)) __ 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] About R and RKward
Hi Ajay, Tks for your URL have you researched out all R commander E plugins before settling on R Kward Whether you meant the interfaces on; http://decisionstats.com/2010/10/05/interfaces-to-r/ No I have no urgent need installing RKward, just interested to know how it work. I tested Red-R before without success. RKward seems to me an Editor of R. B.R. satimis - Original Message From: Ajay Ohri ohri2...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Thu, November 18, 2010 11:30:14 AM Subject: Re: [R] About R and RKward some comparisons for interfaces to R on desktop-draft from blog post (JSS paper is submitted for GUI issue but not vetted) http://decisionstats.com/2010/10/05/interfaces-to-r/ RKward is number 4 have you researched out all R commander E plugins before settling on R Kward R commander is by J Fox- use packages - and it is a seperate Ubuntu /Debian package too (atleast in Karmic) Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.linkedin.com/in/ajayohri On Thu, Nov 18, 2010 at 8:48 AM, Stephen Liu sati...@yahoo.com wrote: Hi all, Has any folk tested or been using RKward? Please shed me some light whether it takes data from the spreadsheet, analyzes the data and puts the data back to the spreadsheet, similar to RExcel and R and Calc. Or RKward is only an editor of R, working on front-end? I have tested RExcel but it works on Windows. I need a Linux version of similar package. R and Calc works on both Windows and Linux. Unfortunately I can't make it to work on Ubuntu 10.10. I'm still struggling. (I haven't tested R and Calc on Windows. I already have a working RExcel on Win7) TIA B.R. Stephen L __ 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-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] About R and RKward
Hi all, Has any folk tested or been using RKward? Please shed me some light whether it takes data from the spreadsheet, analyzes the data and puts the data back to the spreadsheet, similar to RExcel and R and Calc. Or RKward is only an editor of R, working on front-end? I have tested RExcel but it works on Windows. I need a Linux version of similar package. R and Calc works on both Windows and Linux. Unfortunately I can't make it to work on Ubuntu 10.10. I'm still struggling. (I haven't tested R and Calc on Windows. I already have a working RExcel on Win7) TIA B.R. Stephen L __ 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] How to permanently remove [Previously saved workspace restored]
Hi folks, Tks for your advice. Summing up all your advice I performed following steps without success. 1) rm (list = ls( )) q() save working image 2) rm (list = ls(all=TRUE)) q() save working image 3) getwd() [1] C:/Users/satimis .Rhistory list.files(path=C:\Users\satimis, all.files = FALSE) Error: '\U' used without hex digits in character string starting C:\U list.files(path=C:\Users\satimis, all.files = TRUE) Error: '\U' used without hex digits in character string starting C:\U - Windows Explorer delete .Rhistory manually Start R [Previously saved workspace restored] is still there Please advise. TIA B.R. Stephen L - Original Message From: Stephen Liu sati...@yahoo.com To: r-help@r-project.org Sent: Sun, November 14, 2010 2:33:21 PM Subject: [R] How to permanently remove [Previously saved workspace restored] Win 7 64 bit R version 2.11.1 (2010-05-31) How to permanently remove; [Previously saved workspace restored] rm (list = ls( )) On next start it still displays; . [Previously saved workspace restored] There is a file keeping the previous data on Linux .Rdata How about on Windows? TIA B.R. Stephen L __ 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-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] How to permanently remove [Previously saved workspace restored]
Hi Joshua, list.files(path = getwd(), all.files = TRUE) [1] . [2] .. [3] .RData [4] .Rhistory [5] AppData [6] Application Data [7] Contacts [8] Cookies [9] Desktop [10] Documents [11] Downloads [12] Favorites [13] Links [14] Local Settings [15] Music [16] My Documents [17] NetHood [18] NTUSER.DAT [19] ntuser.dat.LOG1 [20] ntuser.dat.LOG2 [21] NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf [22] NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer0001.regtrans-ms [23] NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer0002.regtrans-ms [24] ntuser.ini [25] Pictures [26] PrintHood [27] R [28] Recent [29] Saved Games [30] Searches [31] SendTo [32] Start Menu [33] Templates [34] Videos .Rhistory and .RDate are there. But I can't find .RDate on Windows Explorer. Only .Rhistory is there. rm (list = ls(all=TRUE)) q() save working image On next start of R [Previously saved workspace restored] still popup B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 14, 2010 6:31:11 PM Subject: Re: [R] How to permanently remove [Previously saved workspace restored] On Sun, Nov 14, 2010 at 2:00 AM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Tks for your advice. Summing up all your advice I performed following steps without success. 1) rm (list = ls( )) q() save working image 2) rm (list = ls(all=TRUE)) q() save working image 3) getwd() [1] C:/Users/satimis .Rhistory list.files(path=C:\Users\satimis, all.files = FALSE) Error: '\U' used without hex digits in character string starting C:\U You need to either escape the backslashes (with another backslash) or use forward slashes. Perhaps most simply: list.files(path = getwd(), all.files = FALSE) list.files(path=C:\Users\satimis, all.files = TRUE) Error: '\U' used without hex digits in character string starting C:\U - Windows Explorer delete .Rhistory manually don't forget the .Rdata file, history is separate. Start R [Previously saved workspace restored] is still there Please advise. TIA Sure the message is there but it should have restored an empty workspace so it should have absolutely no impact on your work. If the message really bugs
[R] Problem on update
Hi all, Win7 64 bit R version 2.11.1 (2010-05-31) Ran R as admin update.packages(ask='graphics') --- Please select a CRAN mirror for use in this session --- Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows64/contrib/2.11 It is this site in problem? I tried another mirror with same result. TIA B.R. Stephen L __ 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] About upgrade R
Hi all, Win 7 64-bit R version 2.11.1 (2010-05-31) I want to upgrade R to version 2.12.0 R-2.12.0 for Windows (32/64 bit) http://cran.r-project.org/bin/windows/base/ I found steps on following site; How to upgrade R on windows – another strategy (and the R code to do it) http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ I wonder is there a straight forwards way to upgrade the package direct on repo? TIA B.R. Stephen L __ 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] How to permanently remove [Previously saved workspace restored]
Hi Joshua, But I can't find .RDate on Windows Explorer. Only .Rhistory is there. This is likely a feature of Windows Explorercertain types of files are hidden by default (like those that start with .). You can adjust this behavior in the folder options (if the idea of .. I'm aware of the hidden files. [hidden] on properties has not bee checked. Otherwise .Rhistory won't show up. The strange thing is on; - Start - Search RData I can't find .RData. But search on Rhistory found .Rhistory. Would it be .RData not yet created? On next start of R [Previously saved workspace restored] still popup Now you probably just restored an empty workspace. This is not a problem, it is normal R behavior and is a sign that everything is working as expected. Ah I see. Thanks B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 14, 2010 11:42:37 PM Subject: Re: [R] How to permanently remove [Previously saved workspace restored] On Sun, Nov 14, 2010 at 3:40 AM, Stephen Liu sati...@yahoo.com wrote: Hi Joshua, list.files(path = getwd(), all.files = TRUE) [3] .RData [4] .Rhistory .Rhistory and .RDate are there. Note that these files start with a . But I can't find .RDate on Windows Explorer. Only .Rhistory is there. This is likely a feature of Windows Explorercertain types of files are hidden by default (like those that start with .). You can adjust this behavior in the folder options (if the idea of protected/hidden files and folder options all sounds new to you, now is a great opportunity to spend some time exploring your operating system, learning how it works and how to use it at a more serious level than the basic user it assumesGoogle is your friend here, there are literally thousands of articles, walkthroughs, and tutorials on different aspects of Windows). rm (list = ls(all=TRUE)) This does NOT delete the workspace, it just clears your worksapce of any objects. q() save working image Now you will have saved your current worksapce (which if you just used rm() as above, will be empty, but still there). On next start of R [Previously saved workspace restored] still popup Now you probably just restored an empty workspace. This is not a problem, it is normal R behavior and is a sign that everything is working as expected. B.R. Stephen L __ 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] Problem on update
Hi Uwe, Your advice noted. I'll upgrade R to version 2.12.0 B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 14, 2010 11:02:00 PM Subject: Re: [R] Problem on update On 14.11.2010 15:34, Stephen Liu wrote: Hi all, Win7 64 bit R version 2.11.1 (2010-05-31) Ran R as admin update.packages(ask='graphics') --- Please select a CRAN mirror for use in this session --- Here you selected a CRAN mirror. Fine. Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows64/contrib/2.11 Actually this thing is the CRAN extras repository maintained by Broan Ripley which does not have any mirrors. R-2.11.x in 64-bit was the very first and interim 64-bit solution under Windows. With the release of R-2.12.0 we stopped supporting the 64-bit version of R-2.11.x since we can handle 64-bit much easier now. So please upgrade to R-2.12.x which will probably have the usual support again. Best wishes, Uwe Ligges It is this site in problem? I tried another mirror with same result. TIA B.R. Stephen L __ 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-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] About upgrade R
Hi Uwe, If you have your additionally installed packages in a separate library (not the R base library) you can simply run update.packages(checkBuilt=TRUE) I have following packages installed in addition to R base rcom RExcel statconnDCOM IIRC statconnDCOM and RExcel are on different directories. rcom was installed on repo. I'll run; update.packages(checkBuilt=TRUE) In the worst case I just reinstall abovementioned packages. Any further advice before I start? Thanks B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 14, 2010 11:03:57 PM Subject: Re: [R] About upgrade R Upgrading is mentioned in the FAQs / R for Windows FAQs. If you have your additionally installed packages in a separate library (not the R base library) you can simply run update.packages(checkBuilt=TRUE) If not ... Uwe Ligges On 14.11.2010 15:51, Stephen Liu wrote: Hi all, Win 7 64-bit R version 2.11.1 (2010-05-31) I want to upgrade R to version 2.12.0 R-2.12.0 for Windows (32/64 bit) http://cran.r-project.org/bin/windows/base/ I found steps on following site; How to upgrade R on windows – another strategy (and the R code to do it) http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ / I wonder is there a straight forwards way to upgrade the package direct on repo? TIA B.R. Stephen L __ 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-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] How to permanently remove [Previously saved workspace re
That is a nice reply, Duncan, and an excellent explanation of why .Rdata has no name! I also like the final sentence. I would only add: If you're sane, and want to stay sane, think about not using Windows. Hi Ted, 10 years ago, I have stopped running Windows for production. I only keep Windows for testing. This is a virtual machine running Oracle VBox as virtualizer with Ubuntu 1010 as host. Win7 is running as VM. In certain occasion we still need Windows temporarily such RExcel, a Windows application. I found R and Calc later. RBloomberg is also a Windows application. Very soon a Linux/Unix version will be available, etc. Some enterprises still keep Windows as OS in office. In order to survive we have to follow. B.R. Stephen - Original Message From: ted.hard...@wlandres.net ted.hard...@wlandres.net To: r-help@r-project.org Sent: Mon, November 15, 2010 12:58:51 AM Subject: Re: [R] How to permanently remove [Previously saved workspace re On 14-Nov-10 16:43:18, Duncan Murdoch wrote: On 14/11/2010 10:42 AM, Joshua Wiley wrote: On Sun, Nov 14, 2010 at 3:40 AM, Stephen Liusati...@yahoo.com wrote: Hi Joshua, list.files(path = getwd(), all.files = TRUE) [3] .RData [4] .Rhistory .Rhistory and .RDate are there. Note that these files start with a . But I can't find .RDate on Windows Explorer. Only .Rhistory is there. This is likely a feature of Windows Explorercertain types of files are hidden by default (like those that start with .). That's not true: it's Unix ls that hides filenames starting with a .. Windows Explorer does hide some files, but I don't think it is ever based on the name, it's based on the attributes. What Windows Explorer does that is incredibly stupid is that (by default) it hides file extensions for known file types. Generally .RData will be registered as a known file type. Exporer will cut off the .RData part the name of a file with that extension, and only show the first part of the name. Since the file .RData has no starting part of a name, it will be listed with a blank name. What you should do (and what Microsoft should set the default to) is to turn off this bad policy of listing filenames incorrectly. I don't remember how to do it in Windows 7 or Vista, but on XP, here's how: Go into Explorer in some folder. Click on the Tools menu, then the Folder Options... choice. Choose the View tab. About 10 choices down within Files and Folders, you'll see Hide Extensions for Known File Types. Make sure this is *not* checked. If you're sane, you'll then click on the button Apply to all folders, but you might just want to click on OK to try it out on one folder first. Duncan Murdoch That is a nice reply, Duncan, and an excellent explanation of why .Rdata has no name! I also like the final sentence. I would only add: If you're sane, and want to stay sane, think about not using Windows. Ted. E-Mail: (Ted Harding) ted.hard...@wlandres.net Fax-to-email: +44 (0)870 094 0861 Date: 14-Nov-10 Time: 16:58:49 -- XFMail -- __ 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-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] How to permanently remove [Previously saved workspace restored]
Hi Duncun, Thanks for your advice. Start Window Explorer as Admin - Organize - Folder and Search Option - View Under Advanced settings: [uncheck] Hide extension for known file types - OK .RData shown up. Also it can be searched. B.R. Stephen L - Original Message From: Duncan Murdoch murdoch.dun...@gmail.com To: Joshua Wiley jwiley.ps...@gmail.com Cc: Stephen Liu sati...@yahoo.com; r-help@r-project.org Sent: Mon, November 15, 2010 12:43:18 AM Subject: Re: [R] How to permanently remove [Previously saved workspace restored] On 14/11/2010 10:42 AM, Joshua Wiley wrote: On Sun, Nov 14, 2010 at 3:40 AM, Stephen Liusati...@yahoo.com wrote: Hi Joshua, list.files(path = getwd(), all.files = TRUE) [3] .RData [4] .Rhistory .Rhistory and .RDate are there. Note that these files start with a . But I can't find .RDate on Windows Explorer. Only .Rhistory is there. This is likely a feature of Windows Explorercertain types of files are hidden by default (like those that start with .). That's not true: it's Unix ls that hides filenames starting with a .. Windows Explorer does hide some files, but I don't think it is ever based on the name, it's based on the attributes. What Windows Explorer does that is incredibly stupid is that (by default) it hides file extensions for known file types. Generally .RData will be registered as a known file type. Exporer will cut off the .RData part the name of a file with that extension, and only show the first part of the name. Since the file .RData has no starting part of a name, it will be listed with a blank name. What you should do (and what Microsoft should set the default to) is to turn off this bad policy of listing filenames incorrectly. I don't remember how to do it in Windows 7 or Vista, but on XP, here's how: Go into Explorer in some folder. Click on the Tools menu, then the Folder Options... choice. Choose the View tab. About 10 choices down within Files and Folders, you'll see Hide Extensions for Known File Types. Make sure this is *not* checked. If you're sane, you'll then click on the button Apply to all folders, but you might just want to click on OK to try it out on one folder first. Duncan Murdoch You can adjust this behavior in the folder options (if the idea of protected/hidden files and folder options all sounds new to you, now is a great opportunity to spend some time exploring your operating system, learning how it works and how to use it at a more serious level than the basic user it assumesGoogle is your friend here, there are literally thousands of articles, walkthroughs, and tutorials on different aspects of Windows). rm (list = ls(all=TRUE)) This does NOT delete the workspace, it just clears your worksapce of any objects. q() save working image Now you will have saved your current worksapce (which if you just used rm() as above, will be empty, but still there). On next start of R [Previously saved workspace restored] still popup Now you probably just restored an empty workspace. This is not a problem, it is normal R behavior and is a sign that everything is working as expected. B.R. Stephen L __ 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-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] How to permanently remove [Previously saved workspace restored]
Hi Josh, Start Command Prompt as Admin C:\Windows\system32cd C:\Users\satimis C:\Users\satimisdir Volume in drive C has no label. Volume Serial Number is EC2D-3F1A Directory of C:\Users\satimis 11/14/2010 05:52 PMDIR . 11/14/2010 05:52 PMDIR .. 11/14/2010 01:58 PM42 .RData 11/14/2010 07:33 PM94 .Rhistory 05/11/2010 08:33 PMDIR AppData 08/06/2010 12:57 PMDIR Contacts 11/13/2010 12:00 AMDIR Desktop 11/14/2010 01:39 PMDIR Documents 08/27/2010 05:34 PMDIR Downloads 08/06/2010 12:57 PMDIR Favorites 08/06/2010 12:57 PMDIR Links 08/06/2010 12:57 PMDIR Music 08/06/2010 12:57 PMDIR Pictures 08/19/2010 10:34 AMDIR R 08/06/2010 12:57 PMDIR Saved Games 11/14/2010 07:31 PMDIR Searches 08/06/2010 12:57 PMDIR Videos 2 File(s)136 bytes 15 Dir(s) 19,187,191,808 bytes free .RData is there. C:\Users\satimisdel .RData Start R the warning [Previously saved workspace restored] disappears Thanks B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, November 15, 2010 1:26:16 AM Subject: Re: [R] How to permanently remove [Previously saved workspace restored] @Stephen Sorry, Duncan's right, it is likely not a protected/hidden file issue. At the risk of nuking the fridge, you could also open an elevated command prompt then navigate to the relevant directory and delete the file: cd C:\Users\satimis del .RData exit Probably too much trouble for deleting a single file, but handy if you want to do a lot (e.g., all files with the *.RData extension or...). The new PowerShell is starting to grow on me too (it seems wider), but I am not as familiar with the commands. Josh On Sun, Nov 14, 2010 at 8:43 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: This is likely a feature of Windows Explorercertain types of files are hidden by default (like those that start with .). That's not true: it's Unix ls that hides filenames starting with a .. Windows Explorer does hide some files, but I don't think it is ever based on the name, it's based on the attributes. What Windows Explorer does that is incredibly stupid is that (by default) it hides file extensions for known file types. Generally .RData will be registered as a known file type. Exporer will cut off the .RData part the name of a file with that extension, and only show the first part of the name. Since the file .RData has no starting part of a name, it will be listed with a blank name. What you should do (and what Microsoft should set the default to) is to turn off this bad policy of listing filenames incorrectly. I don't remember how to do it in Windows 7 or Vista, but on XP, here's how: Go into Explorer in some folder. Click on the Tools menu, then the Folder Options... choice. Choose the View tab. About 10 choices down within Files and Folders, you'll see Hide Extensions for Known File Types. Make sure this is *not* checked. @Duncan You're right, as usual. I mixed Windows and Linux. Changing the setting for extensions is basically as you described on my Windows 7 except I have to hit the left alt for Windows Explorer to even show the file menu where I can click on Tools - Folder Options (maybe just my configuration). Does .RData get registered by default but not .Rhistory? (since Stephen reported seeing the .Rhistory file). If you're sane, you'll then click on the button Apply to all folders, but you might just want to click on OK to try it out on one folder first. Duncan Murdoch __ 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] About upgrade R
Hi Ajay wont it make more common sense to make updating packages also as part of every base version install BY Default.. just saying I also have this doubt? The packages have been updated. Are those packages updated belong to version 2.12 OR still version 2.11.1 In Linux/Unix if the latest version, say 5.2.0, and the running version is 5.1.0 I have to upgrade the version NOT the packages. I have no idea on R B.R. Stephen L - Original Message From: Ajay Ohri ohri2...@gmail.com To: Uwe Ligges lig...@statistik.tu-dortmund.de Cc: Stephen Liu sati...@yahoo.com; r-help@r-project.org Sent: Mon, November 15, 2010 12:59:22 AM Subject: Re: [R] About upgrade R wont it make more common sense to make updating packages also as part of every base version install BY Default.. just saying Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.linkedin.com/in/ajayohri 2010/11/14 Uwe Ligges lig...@statistik.tu-dortmund.de: Upgrading is mentioned in the FAQs / R for Windows FAQs. If you have your additionally installed packages in a separate library (not the R base library) you can simply run update.packages(checkBuilt=TRUE) If not ... Uwe Ligges On 14.11.2010 15:51, Stephen Liu wrote: Hi all, Win 7 64-bit R version 2.11.1 (2010-05-31) I want to upgrade R to version 2.12.0 R-2.12.0 for Windows (32/64 bit) http://cran.r-project.org/bin/windows/base/ I found steps on following site; How to upgrade R on windows – another strategy (and the R code to do it) http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ / I wonder is there a straight forwards way to upgrade the package direct on repo? TIA B.R. Stephen L __ 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-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-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] About upgrade R
Hi Stephen and folks mv .Rprofile Rprofile I can't find .Rprofile on Win7 even with [uncheck] Hide extension for known file types on Windows Explorer. Nor I can search for it. Would it be under another name in Windows? B.R. Stephen L - Original Message From: stephen sefick ssef...@gmail.com To: r-help@r-project.org Sent: Mon, November 15, 2010 4:19:15 AM Subject: Re: [R] About upgrade R update.packages has always worked well for me. I have a customized .Rprofile file and just update from linux repos, or build from source mv .Rprofile Rprofile update all packages mv Rprofile .Rprofile It only takes a couple of minutes and everything is up I like being in control of what happens on my system. Stephen On Sun, Nov 14, 2010 at 2:05 PM, John C Frain fra...@gmail.com wrote: The current method allows one to easily retain several versions working in parallel. This particularly important if some package is not available in the new version. A few years ago there were problems such as these during a major overhaul of the rmetrics group of packages. My current practice is to retain older versions until I am sure that all I need is available in the new version. Thus I am in favour of retaining the current system. John On Sunday, Novembe 14, 2010, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 14.11.2010 17:59, Ajay Ohri wrote: wont it make more common sense to make updating packages also as part of every base version install BY Default.. just saying At least I do not like the idea: If I just want to try a beta version, I do not want that everything is updated and I can't switch back to my last stable version. Uwe Ligges Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.linkedin.com/in/ajayohri 2010/11/14 Uwe Liggeslig...@statistik.tu-dortmund.de: Upgrading is mentioned in the FAQs / R for Windows FAQs. If you have your additionally installed packages in a separate library (not the R base library) you can simply run update.packages(checkBuilt=TRUE) If not ... Uwe Ligges On 14.11.2010 15:51, Stephen Liu wrote: Hi all, Win 7 64-bit R version 2.11.1 (2010-05-31) I want to upgrade R to version 2.12.0 R-2.12.0 for Windows (32/64 bit) http://cran.r-project.org/bin/windows/base/ I found steps on following site; How to upgrade R on windows – another strategy (and the R code to do it) http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ / I wonder is there a straight forwards way to upgrade the package direct on repo? TIA B.R. Stephen L __ 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-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-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. -- John C Frain Economics Department Trinity College Dublin Dublin 2 Ireland www.tcd.ie/Economics/staff/frainj/home.html mailto:fra...@tcd.ie mailto:fra...@gmail.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. -- Stephen Sefick | Auburn University | | Department of Biological Sciences | | 331 Funchess Hall | | Auburn, Alabama | | 36849| |___| | sas0...@auburn.edu | | http://www.auburn.edu/~sas0025 | |___| Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis A big computer, a complex algorithm and a long time does not equal science. -Robert Gentleman __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help
Re: [R] About upgrade R
Hi Josh and all, I think .Rprofile is something you have to create yourself No, it is a file on Linux OS Start R as Admin update.packages(checkBuilt=TRUE) --- Please select a CRAN mirror for use in this session --- Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows64/contrib/2.11 It didn't work. Start MS Excel 2007 to make sure following packages; RExcel rcom statconnDCOM work To remove R 2.11.1 Start - Control Panel - Uninstall a program - highlight R for windows x64 2.11.1 - Uninstall Download Windows R-2.12.0 for Windows (32/64 bit) http://cran.at.r-project.org/ - Windows - base - Download R 2.12.0 for Windows (32/64 bit) - Run Select Destination Location C:\Program Files\R-2.12.0 - Next select Default settings and add; On-line PDF Manuals [check] Technical Manual [check] PDF help pages SupportFiles for Package tcltk [check] Timezone files for Tcl [check] Tcl/Tk Help (Compiled HTML) [check Test files - Next Startup options [check] No (accep defaults) - Next Select Start Menu Folder R - Next Select Additional Tasks [check] Create a desktop icon [check] Save version number in registry [check] Associate R with .RData files - Next - Finish Installation went throught w/o complaint To my surprise there are 2 R icons on desktop - R x64 2.12.0 - R 2.12.0 I suppose the 2nd one is 32bit version? I don't need 2 R versions here. This is a 64bit Win7. Can I delete the 32bit R? Start MS Excel 2007 - start R complaining R server not available. I have to reinstall; rcom statconnDCOM RExcel Now R 2.12 is running on Win7. RExcel also works B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, November 15, 2010 11:19:38 AM Subject: Re: [R] About upgrade R Hi Stephen, I think .Rprofile is something you have to create yourself. It is not needed, but you can create it and then put your customizations in it (just put it in the same directory as the directory R starts in. Cheers, Josh On Sun, Nov 14, 2010 at 6:15 PM, Stephen Liu sati...@yahoo.com wrote: Hi Stephen and folks mv .Rprofile Rprofile I can't find .Rprofile on Win7 even with [uncheck] Hide extension for known file types on Windows Explorer. Nor I can search for it. Would it be under another name in Windows? B.R. Stephen L - Original Message From: stephen sefick ssef...@gmail.com To: r-help@r-project.org Sent: Mon, November 15, 2010 4:19:15 AM Subject: Re: [R] About upgrade R update.packages has always worked well for me. I have a customized .Rprofile file and just update from linux repos, or build from source mv .Rprofile Rprofile update all packages mv Rprofile .Rprofile It only takes a couple of minutes and everything is up I like being in control of what happens on my system. Stephen On Sun, Nov 14, 2010 at 2:05 PM, John C Frain fra...@gmail.com wrote: The current method allows one to easily retain several versions working in parallel. This particularly important if some package is not available in the new version. A few years ago there were problems such as these during a major overhaul of the rmetrics group of packages. My current practice is to retain older versions until I am sure that all I need is available in the new version. Thus I am in favour of retaining the current system. John On Sunday, Novembe 14, 2010, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 14.11.2010 17:59, Ajay Ohri wrote: wont it make more common sense to make updating packages also as part of every base version install BY Default.. just saying At least I do not like the idea: If I just want to try a beta version, I do not want that everything is updated and I can't switch back to my last stable version. Uwe Ligges Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.linkedin.com/in/ajayohri 2010/11/14 Uwe Liggeslig...@statistik.tu-dortmund.de: Upgrading is mentioned in the FAQs / R for Windows FAQs. If you have your additionally installed packages in a separate library (not the R base library) you can simply run update.packages(checkBuilt=TRUE) If not ... Uwe Ligges On 14.11.2010 15:51, Stephen Liu wrote: Hi all, Win 7 64-bit R version 2.11.1 (2010-05-31) I want to upgrade R to version 2.12.0 R-2.12.0 for Windows (32/64 bit) http://cran.r-project.org/bin/windows/base/ I found steps on following site; How to upgrade R on windows – another strategy (and the R code to do it) http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ / I wonder is there a straight forwards way to upgrade the package direct on repo? TIA B.R. Stephen L __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting
[R] How to permanently remove [Previously saved workspace restored]
Win 7 64 bit R version 2.11.1 (2010-05-31) How to permanently remove; [Previously saved workspace restored] rm (list = ls( )) On next start it still displays; . [Previously saved workspace restored] There is a file keeping the previous data on Linux .Rdata How about on Windows? TIA B.R. Stephen L __ 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] Problem on installing statconnDCOM and RBloomberg
Installation of rcom, statconnDCOM and RBloomberg Hi folks, Win7 64bit R version 2.11.1 (2010-05-31) Perform following steps to install rcom, statconnDCOM and RBloomberg 1) rcom installation login Win7 as administrator and start R install.packages(rcom) --- Please select a CRAN mirror for use in this session --- also installing the dependency ‘rscproxy’ trying URL 'http://ftp.ctex.org/mirrors/CRAN/bin/windows64/contrib/2.11/rscproxy_1.3-1.zip' Content type 'application/zip' length 39922 bytes (38 Kb) opened URL downloaded 38 Kb trying URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows64/contrib/2.11/rcom_2.2-3.1.zip' Content type 'application/zip' length 251974 bytes (246 Kb) opened URL downloaded 246 Kb package 'rscproxy' successfully unpacked and MD5 sums checked package 'rcom' successfully unpacked and MD5 sums checked ?rcom No documentation for 'rcom' in specified packages and libraries: you could try '??rcom' ??rcom Starts a new window:- Help files with alias or concept or title matching ‘rcom’ using regular expression matching: 2) statconnDCOM installation installstatconnDCOM() trying URL 'http://rcom.univie.ac.at/download/current/statconnDCOM.latest.exe' Content type 'application/octet-stream' length 7153056 bytes (6.8 Mb) opened URL downloaded 6.8 Mb Setup - statconnDCOM Select Components Local Server Files [check] Simple Server Test Files Remote Server Files Development Files statconnDCOM Example Files statconn\DCOM Ready to Install Destination location: C:\Program Files (x86)\statconn\DCOM Setup type: Custom Installation Selected components: Simple Server Test Files Start Menu folder: statconn\DCOM Unable to execute file: C:\Program File (x86)\statconn\DCOM\bin\StatConnectorSrv.exe CreateProcess failed; code 2. The system cannot find the file specified. - OK Finally starting:- R: statconnDCOM - WindowsInternet Explorer C:\Program Files (x86)\statconn\DCOM\doc\00Index.html Index for statconnDCOM Please advise how to fix the above problem. TIA 3) Bloomberg installation install.packages(RBloomberg, repos=http://R-Forge.R-project.org;) Warning: unable to access index for repository http://R-Forge.R-project.org/bin/windows64/contrib/2.11 Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ‘RBloomberg’ is not available The package is not available. Which repo shall I use? Thanks B.R. Stephen L __ 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] About 5.1 Arrays
Hi Joshua, .You can think of a 3d array kind of like a journal (I don't know if this is helpful, but I kind of like the analogy so...). Each page holds a two dimensional table, so I could tell you to look at row 4, column 3 on page 16. Nevertheless, at any given point, it is just a flat page. A good example. It can be regarded as a book with multiple pages. Each page holds a table of 2 dimensions. No, it is correct. You cannot assume that you may use the same indices to access an array when you have created it with different dimensions. Consider: array(1:24, dim = c(3, 4, 2))[1, 2, 1] [1] 4 array(1:24, dim = c(1, 2, 1))[1, 2, 1] [1] 2 I understand now, e.g. array(1:24, dim = c(3, 4, 2))[2,3,2] [1] 20 Not array(1:24, dim = c(2, 3, 2))[2,3,2] [1] 12 Lot of thanks for your advice and effort. B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Mon, November 8, 2010 8:33:50 AM Subject: Re: [R] About 5.1 Arrays On Sat, Nov 6, 2010 at 7:38 AM, Stephen Liu sati...@yahoo.com wrote: Hi Joshua, Thanks for your advice. 1) Re your advice:-[quote] a3d , , 1 --- this is the first position of the third dimension ***THIS IS THE THIRD DIMENSION*** [,1] [,2] [,3] [,4] --- positions 1, 2, 3, 4 of the second dimension [1,]147 10 [2,]258 11 [3,]369 12 ^ the first dimension , , 2 --- the second position of the third dimension ***THIS IS THE THIRD DIMENSION*** ... [/quote] Where is the third dimension? I pointed to the third dimension above. You can think of a 3d array kind of like a journal (I don't know if this is helpful, but I kind of like the analogy so...). Each page holds a two dimensional table, so I could tell you to look at row 4, column 3 on page 16. Nevertheless, at any given point, it is just a flat page. 2) Re your advice:-[quote] so you can think that in the original vector a: 1 maps to a[1, 1, 1] in the 3d array 2 maps to a[2, 1, 1]. 3 maps to a[3, 1, 1] 4 maps to a[1, 2, 1] 12 maps to a[3, 4, 1] 20 maps to a[2, 3, 2] 24 maps to a[3, 4, 2] [/quote] My finding; # 1 maps to a[1, 1, 1] in the 3d array a3d - array(a, dim = c(1, 1, 1)) a3d , , 1 [,1] [1,]1 Correct # 2 maps to a[2, 1, 1]. a3d - array(a, dim = c(2, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 Correct # 3 maps to a[3, 1, 1] a3d - array(a, dim = c(3, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 [3,]3 Correct # 4 maps to a[1, 2, 1] a3d - array(a, dim = c(1, 2, 1)) a3d , , 1 [,1] [,2] [1,]12 Incorrect. It is 2 No, it is correct. You cannot assume that you may use the same indices to access an array when you have created it with different dimensions. Consider: array(1:24, dim = c(3, 4, 2))[1, 2, 1] [1] 4 array(1:24, dim = c(1, 2, 1))[1, 2, 1] [1] 2 # 12 maps to a[3, 4, 1] a3d - array(a, dim = c(3, 4, 1)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 Correct # 20 maps to a[2, 3, 2] a3d - array(a, dim = c(2, 3, 2)) a3d , , 1 [,1] [,2] [,3] [1,]135 [2,]246 , , 2 [,1] [,2] [,3] [1,]79 11 [2,]8 10 12 Incorrect. It is 12 See my above comment about not expecting things in the same location when you change the space they live in. Sorry this was so slow in coming, I missed the email somehow. Cheers, Josh [snip] __ 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] About 5.1 Arrays
Hi Richard, ## for an array with ## dim(a) == c(3,4,2) ## a[i,j,k] means select the element in position ##i + (j-1)*3 + (k-1)*3*4 My understanding; e.g. 1) dim(a) == c(3,4,2) 3 + (4-1)*3 + (2-1)*3*4 3+9+12=24 2) ## dim(a) == c(1,2,1) 1 + (2-1)*3 + (1-1)*3*4 1+3+0=4 3) ## dim(a) == c(2,3,1) 2 + (3-1)*3 + (1-1)*3*4 2+6+0=8 etc. It is NOT always the product of i*j*k as I thought before. Thanks for your explanation. What are the value of 3 and 4? The values of position and dimension? e.g. a - sample(24) a [1] 22 18 17 10 24 1 11 13 9 19 20 8 2 21 23 16 7 14 12 15 4 5 3 6 dim(a) - c(3,4,2) a , , 1 [,1] [,2] [,3] [,4] -- positions 1, 2, 3, 4 of the second dimension ? [1,] 22 10 11 19 [2,] 18 24 13 20 [3,] 17198 ^ the first dimension ? , , 2 [,1] [,2] [,3] [,4] [1,]2 16 125 [2,] 217 153 [3,] 23 1446 ? If I'm wrong pls correct me. TIA Now I'm going to digest Joshua's advice. B.R. Stephen L From: RICHARD M. HEIBERGER r...@temple.edu Cc: Daniel Nordlund djnordl...@frontier.com; r-help@r-project.org Sent: Sat, November 6, 2010 12:48:35 AM Subject: Re: [R] About 5.1 Arrays Continuing with Daniel's example, but with different data values a - sample(24) a dim(a) - c(3,4,2) a as.vector(a) ## for an array with ## dim(a) == c(3,4,2) ## a[i,j,k] means select the element in position ##i + (j-1)*3 + (k-1)*3*4 index - function(i,j,k) { i + (j-1)*3 + (k-1)*3*4 } ## find the vector position described by row 2, column 1, layer 2 index(2,1,2)## this is the position in the original vector a[2,1,2]## this is the value in that position with 3D indexing a[index(2,1,2)] ## this is the same value with 1D vector indexing a[14] ## this is the same value with 1D vector indexing ## find the position in row 3, column 4, layer 1 index(3,4,1)## this is the position in the original vector a[3,4,1]## this is the value in that position with 3D indexing a[index(3,4,1)] ## this is the same value with 1D vector indexing a[12] ## this is the same value with 1D vector indexing index(1,1,1)## this is the position in the original vector index(2,1,1)## this is the position in the original vector index(3,1,1)## this is the position in the original vector index(1,2,1)## this is the position in the original vector index(2,2,1)## this is the position in the original vector index(3,2,1)## this is the position in the original vector index(1,3,1)## this is the position in the original vector index(2,3,1)## this is the position in the original vector index(3,3,1)## this is the position in the original vector index(1,4,1)## this is the position in the original vector index(2,4,1)## this is the position in the original vector index(3,4,1)## this is the position in the original vector index(1,1,2)## this is the position in the original vector index(2,1,2)## this is the position in the original vector index(3,1,2)## this is the position in the original vector index(1,2,2)## this is the position in the original vector index(2,2,2)## this is the position in the original vector index(3,2,2)## this is the position in the original vector index(1,3,2)## this is the position in the original vector index(2,3,2)## this is the position in the original vector index(3,3,2)## this is the position in the original vector index(1,4,2)## this is the position in the original vector index(2,4,2)## this is the position in the original vector index(3,4,2)## this is the position in the original vector [[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.
Re: [R] About 5.1 Arrays
Hi Joshua, Thanks for your advice. 1) Re your advice:-[quote] a3d , , 1 --- this is the first position of the third dimension [,1] [,2] [,3] [,4] --- positions 1, 2, 3, 4 of the second dimension [1,]147 10 [2,]258 11 [3,]369 12 ^ the first dimension , , 2 --- the second position of the third dimension ... [/quote] Where is the third dimension? 2) Re your advice:-[quote] so you can think that in the original vector a: 1 maps to a[1, 1, 1] in the 3d array 2 maps to a[2, 1, 1]. 3 maps to a[3, 1, 1] 4 maps to a[1, 2, 1] 12 maps to a[3, 4, 1] 20 maps to a[2, 3, 2] 24 maps to a[3, 4, 2] [/quote] My finding; # 1 maps to a[1, 1, 1] in the 3d array a3d - array(a, dim = c(1, 1, 1)) a3d , , 1 [,1] [1,]1 Correct # 2 maps to a[2, 1, 1]. a3d - array(a, dim = c(2, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 Correct # 3 maps to a[3, 1, 1] a3d - array(a, dim = c(3, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 [3,]3 Correct # 4 maps to a[1, 2, 1] a3d - array(a, dim = c(1, 2, 1)) a3d , , 1 [,1] [,2] [1,]12 Incorrect. It is 2 # 12 maps to a[3, 4, 1] a3d - array(a, dim = c(3, 4, 1)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 Correct # 20 maps to a[2, 3, 2] a3d - array(a, dim = c(2, 3, 2)) a3d , , 1 [,1] [,2] [,3] [1,]135 [2,]246 , , 2 [,1] [,2] [,3] [1,]79 11 [2,]8 10 12 Incorrect. It is 12 # 24 maps to a[3, 4, 2] a3d - array(a, dim = c(3, 4, 2)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 , , 2 [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 Correct. If I'm wrong, pls correct me. Thanks B.R. Stephen - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, November 6, 2010 12:48:27 AM Subject: Re: [R] About 5.1 Arrays On Fri, Nov 5, 2010 at 9:17 AM, Stephen Liu sati...@yahoo.com wrote: Hi Daniel, Thanks for your detail advice. I completely understand your explain. But I can't resolve what does a stand for there? the a just represents some vector. It is the name of the object that stores your data. Like you might tell someone to go look in a book to find some information. a[1,1,1] is 1 * 1 * 1 = 1 a[2,1,1] is 2 * 1 * 1 = 2 a[2,4,2] is 2 * 4 * 2 = 16 a[3,4,2] is 3 * 4 * 2 = 24 That is the basic idea, but it may not be the most helpful way to think of it because it depends on the length of the each dimension. For example a[1, 2, 1] is not 1 * 2 * 1 = 2 a[1, 1, 2] is not 1 * 1 * 2 = 2 in the little 3d array I show below, it would actually be a[1, 2, 1] = 4 a[1, 1, 2] = 13 ? B.R. Stephen L - Original Message From: Daniel Nordlund djnordl...@frontier.com To: r-help@r-project.org Sent: Fri, November 5, 2010 11:54:15 PM Subject: Re: [R] About 5.1 Arrays -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Liu Sent: Friday, November 05, 2010 7:57 AM To: Steve Lianoglou Cc: r-help@r-project.org Subject: Re: [R] About 5.1 Arrays Hi Steve, It's not clear what you're having problems understanding. By setting the dim attribute of your (1d) vector, you are changing itsdimenensions. I'm following An Introduction to R to learn R On 5.1 Arrays http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment It mentions:- ... For example if the dimension vector for an array, say a, is c(3,4,2) then there are 3 * 4 * 2 = 24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. I don't understand on =24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? What does it mean the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? because it is actually stored as a 1 dimensional vector, it is just telling you the order. For example, given some vector a that contains the numbers 1 through 24, you could reshape this into a three dimensional object. It would be stored like: # make a vector a and an array (built from a) called a3d a - 1:24 a3d - array(a, dim = c(3, 4, 2)) a [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 a3d , , 1 --- this is the first position of the third dimension [,1] [,2] [,3] [,4] --- positions 1, 2, 3, 4 of the second dimension [1,]147 10 [2,]258 11 [3,]369 12 ^ the first dimension , , 2 --- the second position of the third dimension [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 a[1, 1, 1] is the first element of dimension
[R] Where to get rcom for Linux
Hi folks, Debian 600 64-bit Is rcom for Linux available? rcom rcom: R COM Client Interface and internal COM Server http://cran.r-project.org/web/packages/rcom/index.html If YES please advise where to get it. TIA B.R. Stephen L __ 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] Where to get rcom for Linux
- Original Message From: Shige Song shiges...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sun, November 7, 2010 12:17:42 AM Subject: Re: [R] Where to get rcom for Linux isn't COM a Windows-only technology? Hi Shige Thanks. I see. I was surprised for unable to find it after having turned over the whole Internet World. Which Windows version Win7/Vista/Win Server 2008 will be more suitable running RBloomberg? B.R. Stephen L On Sat, Nov 6, 2010 at 12:12 PM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Debian 600 64-bit Is rcom for Linux available? rcom rcom: R COM Client Interface and internal COM Server http://cran.r-project.org/web/packages/rcom/index.html If YES please advise where to get it. TIA B.R. Stephen L __ 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-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] About 5.1 Arrays
Hi Daniel, I am correcting you. :-) You are using dim() incorrectly, and not accessing the array correctly. In all of your examples you should be using dim(3,4,2). Then you need to specify the indexes of the array element you want to look at. So, to use your example Thanks for your correction. So the index to be used in my example should be (3,4,2) only. But still I'm not very clear re your advice on follows a-1:24 a3d - array(a, dim = c(3,4,2)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 , , 2 [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 # 1 maps to a[1, 1, 1] in the 3d array a3d[1, 1, 1] [1] 1 # 2 maps to a[2, 1, 1]. a3d[2, 1, 1] [1] 2 # 3 maps to a[3, 1, 1] a3d[3, 1, 1] [1] 3 # 4 maps to a[1, 2, 1] a3d[1, 2, 1] [1] 4 What does it mean; [1] 1 [1] 2 [1] 3 [1] 4 as mentioned ? Anyway I'll move/continue on the manual to see what will happen. B.R. Stephen L - Original Message From: Daniel Nordlund djnordl...@frontier.com To: r-help@r-project.org Sent: Sun, November 7, 2010 2:08:04 AM Subject: Re: [R] About 5.1 Arrays -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Liu Sent: Saturday, November 06, 2010 7:38 AM To: Joshua Wiley Cc: r-help@r-project.org Subject: Re: [R] About 5.1 Arrays Hi Joshua, Thanks for your advice. 1) Re your advice:-[quote] a3d , , 1 --- this is the first position of the third dimension [,1] [,2] [,3] [,4] --- positions 1, 2, 3, 4 of the second dimension [1,]147 10 [2,]258 11 [3,]369 12 ^ the first dimension , , 2 --- the second position of the third dimension ... [/quote] Where is the third dimension? 2) Re your advice:-[quote] so you can think that in the original vector a: 1 maps to a[1, 1, 1] in the 3d array 2 maps to a[2, 1, 1]. 3 maps to a[3, 1, 1] 4 maps to a[1, 2, 1] 12 maps to a[3, 4, 1] 20 maps to a[2, 3, 2] 24 maps to a[3, 4, 2] [/quote] My finding; # 1 maps to a[1, 1, 1] in the 3d array a3d - array(a, dim = c(1, 1, 1)) a3d , , 1 [,1] [1,]1 Correct # 2 maps to a[2, 1, 1]. a3d - array(a, dim = c(2, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 Correct # 3 maps to a[3, 1, 1] a3d - array(a, dim = c(3, 1, 1)) a3d , , 1 [,1] [1,]1 [2,]2 [3,]3 Correct # 4 maps to a[1, 2, 1] a3d - array(a, dim = c(1, 2, 1)) a3d , , 1 [,1] [,2] [1,]12 Incorrect. It is 2 # 12 maps to a[3, 4, 1] a3d - array(a, dim = c(3, 4, 1)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 Correct # 20 maps to a[2, 3, 2] a3d - array(a, dim = c(2, 3, 2)) a3d , , 1 [,1] [,2] [,3] [1,]135 [2,]246 , , 2 [,1] [,2] [,3] [1,]79 11 [2,]8 10 12 Incorrect. It is 12 # 24 maps to a[3, 4, 2] a3d - array(a, dim = c(3, 4, 2)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 , , 2 [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 Correct. If I'm wrong, pls correct me. Thanks B.R. Stephen Stephen, I am correcting you. :-) You are using dim() incorrectly, and not accessing the array correctly. In all of your examples you should be using dim(3,4,2). Then you need to specify the indexes of the array element you want to look at. So, to use your example a-1:24 a3d - array(a, dim = c(3,4,2)) a3d , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 , , 2 [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 # 1 maps to a[1, 1, 1] in the 3d array a3d[1, 1, 1] [1] 1 # 2 maps to a[2, 1, 1]. a3d[2, 1, 1] [1] 2 # 3 maps to a[3, 1, 1] a3d[3, 1, 1] [1] 3 # 4 maps to a[1, 2, 1] a3d[1, 2, 1] [1] 4 Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ 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-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] About 5.1 Arrays
Hi folks, (Learning R) 5.1 Arrays http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment 1) If continued on previous example (3.1 Intrinsic attributes: mode and length), z - 0:9 dim(z) - c(3,5,100) Error in dim(z) - c(3, 5, 100) : dims [product 1500] do not match the length of object [10] failed. 2) Ran; z - 0:1499 dim(z) - c(3,5,100) dim(z) [1] 3 5 100 It worked OR 3) z - 1:1500 dim(z) - c(3,5,100) dim(z) [1] 3 5 100 It also worked. z [1]123456789 10 11 12 13 14 [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 . [1485] 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 [1499] 1499 1500 0 is counted as 1 object. Does object length mean the total number of objects/entries? Please help me to understand follow; For example if the dimension vector for an array, say a, is c(3,4,2) then there are 3 * 4 * 2 = 24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. I don't understand; a[1,1,1], a[2,1,1], ..., a[2,4,2] 1 * 1 * 1 / 2 * 1 * 1 / 2 * 4 * 2 is NOT 24 ? TIA B.R. Stephen L __ 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] About 5.1 Arrays
Hi Gerrit, Thanks for your advice. - snip - A[i, j, k] is the value of the element in position (i,j,k) of array A. In other words, it is the entry in row i, column j, and layer k (if one wants to think of A as a cuboidal grid). Sorry I can't follow. Could you pls explain in more detail. e.g. z - 0:23 dim(z) - c(3,4,2) dim(z) [1] 3 4 2 z , , 1 [,1] [,2] [,3] [,4] [1,]0369 [2,]147 10 [3,]258 11 , , 2 [,1] [,2] [,3] [,4] [1,] 12 15 18 21 [2,] 13 16 19 22 [3,] 14 17 20 23 TIA B.R. Stephen L - AOR Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32109http://www.uni-giessen.de/cms/eichner - __ 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] About installing RBloomberg
Hi folks, Debian 600 64bit desktop sudo R Password: install.packages(RBloomberg, repos=http://R-Forge.R-project.org;) * DONE (zoo) ERROR: dependencies ‘rcom’, ‘bitops’, ‘RUnit’ are not available for package ‘RBloomberg’ * removing ‘/usr/local/lib/R/site-library/RBloomberg’ Failed install.packages(RBloomberg, rcom, bitops, RUnit, repos=http://R-Forge.R-project.org;) Warning in install.packages(RBloomberg, rcom, bitops, RUnit, repos = http://R-Forge.R-project.org;) : 'lib = rcom' is not writable Would you like to create a personal library '~/R/x86_64-pc-linux-gnu-library/2.11' to install packages into? (y/n) Whether I need to create a personal library However I found rcom, bitops and RUnit on Debian repo; $ apt-cache search bitops | grep r-cran r-cran-bitops - GNU R package implementing bitwise operations $ apt-cache search RUnit | grep r-cran r-cran-runit - GNU R package providing unit testing framework $ apt-cache search rcom | grep r-cran r-cran-rcpp - GNU R / C++ interface classes and examples Can I install them on Debian repo? TIA B.R. Stephen L __ 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] About 5.1 Arrays
Hi Steve, It's not clear what you're having problems understanding. By setting the dim attribute of your (1d) vector, you are changing itsdimenensions. I'm following An Introduction to R to learn R On 5.1 Arrays http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment It mentions:- ... For example if the dimension vector for an array, say a, is c(3,4,2) then there are 3 * 4 * 2 = 24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. I don't understand on =24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? What does it mean the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? Thanks B.R. Stephen - Original Message From: Steve Lianoglou mailinglist.honey...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: Gerrit Eichner gerrit.eich...@math.uni-giessen.de; r-help@r-project.org Sent: Fri, November 5, 2010 10:18:18 PM Subject: Re: [R] About 5.1 Arrays Hi, On Fri, Nov 5, 2010 at 6:00 AM, Stephen Liu sati...@yahoo.com wrote: [snip] A[i, j, k] is the value of the element in position (i,j,k) of array A. In other words, it is the entry in row i, column j, and layer k (if one wants to think of A as a cuboidal grid). Sorry I can't follow. Could you pls explain in more detail. e.g. z - 0:23 dim(z) - c(3,4,2) dim(z) [1] 3 4 2 z , , 1 [,1] [,2] [,3] [,4] [1,]0369 [2,]147 10 [3,]258 11 , , 2 [,1] [,2] [,3] [,4] [1,] 12 15 18 21 [2,] 13 16 19 22 [3,] 14 17 20 23 It's not clear what you're having problems understanding. By setting the dim attribute of your (1d) vector, you are changing its dimenensions. ## This is a 1d vector R x - 1:12 R x ## I can change it into 2d (like a matrix), let's do 2 rows, 6 columns R dim(x) - c(2,6) R [,1] [,2] [,3] [,4] [,5] [,6] [1,]13579 11 [2,]2468 10 12 If you understand that using three numbers to set the dimension means you are making a 3d matrix R dim(x) - c(2,3,2) But the problem is you can't draw 3d in a terminal, so it just draws the third dimension in order R x x , , 1 [,1] [,2] [,3] [1,]135 [2,]246 , , 2 [,1] [,2] [,3] [1,]79 11 [2,]8 10 12 ### Imagine this as a cube: ,,1 is the front layer, ,,2 is the back layer. Just chew on it for a minute, it'll make sense. -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact __ 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] About 5.1 Arrays
Hi Daniel, Thanks for your detail advice. I completely understand your explain. But I can't resolve what does a stand for there? a[1,1,1] is 1 * 1 * 1 = 1 a[2,1,1] is 2 * 1 * 1 = 2 a[2,4,2] is 2 * 4 * 2 = 16 a[3,4,2] is 3 * 4 * 2 = 24 ? B.R. Stephen L - Original Message From: Daniel Nordlund djnordl...@frontier.com To: r-help@r-project.org Sent: Fri, November 5, 2010 11:54:15 PM Subject: Re: [R] About 5.1 Arrays -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Liu Sent: Friday, November 05, 2010 7:57 AM To: Steve Lianoglou Cc: r-help@r-project.org Subject: Re: [R] About 5.1 Arrays Hi Steve, It's not clear what you're having problems understanding. By setting the dim attribute of your (1d) vector, you are changing itsdimenensions. I'm following An Introduction to R to learn R On 5.1 Arrays http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment It mentions:- ... For example if the dimension vector for an array, say a, is c(3,4,2) then there are 3 * 4 * 2 = 24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. I don't understand on =24 entries in a and the data vector holds them in the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]. the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? What does it mean the order a[1,1,1], a[2,1,1], ..., a[2,4,2], a[3,4,2]? Thanks B.R. Stephen Stephen, Start with a vector of length = 12. The vector, v, is stored in consecutive locations in memory, one after the other. And v - 1:12 v [1] 1 2 3 4 5 6 7 8 9 10 11 12 Now change then change the dimension of v to c(3,4), i.e. a matrix with 3 rows and 4 columns. dim(v) - c(3,4) v [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 The values of v are still stored in memory in consecutive locations. But now you refer to the first location as v[1,1], the second as v[2,1], third as v[3,1] ... and the 12th as v[3,4]. We sometimes talk about the values going into v[1,1] or more generally, v[i,j], but the values aren't going anywhere. They are still stored in consecutive locations. We are just changing how they are referred to when we change the dimensions. So in the 2-dimensional matrix above, the values of the vector v go into the matrix in column order, i.e. the first column is filled first, then the second, ... Now, create a 24 element vector. v - 1:24 v [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Change the dimensions to a 3-dimensional array. dim(v) - c(3,4,2) v , , 1 [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 , , 2 [,1] [,2] [,3] [,4] [1,] 13 16 19 22 [2,] 14 17 20 23 [3,] 15 18 21 24 You can visualize a 3-dimensional array as a series of 2-dimensional arrays stacked on top of each other. But this is just a convenient image. The items are still stored consecutively in memory. Notice that layer one in the stack was filled first, and the first layer was filled just like the previous 2-dimensional example. But the items are still physically stored linearly, in consecutive locations in memory. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ 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-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] Logical vectors
Hi Gerrit, Thanks for your advice. In; 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics It states:- The logical operators are , =, , =, == for exact equality and != for inequality # exact equality != # inequality I did follows; x - 1:5 x [1] 1 2 3 4 5 temp - x != 1 temp [1] FALSE TRUE TRUE TRUE TRUE That is correct. rm(temp) temp - x 1 temp [1] FALSE TRUE TRUE TRUE TRUE That seems not correct. My understanding is; [1] TRUE FALSE FALSE FALSE FALSE B.R. Stephen L - Original Message From: Gerrit Eichner gerrit.eich...@math.uni-giessen.de To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Thu, November 4, 2010 2:34:55 PM Subject: Re: [R] Logical vectors On Wed, 3 Nov 2010, Stephen Liu wrote: [snip] 2) x [1] 1 2 3 4 5 temp - x 1 temp [1] FALSE TRUE TRUE TRUE TRUE Why NOT temp [1] TRUE FALSE FALSE FALSE FALSE ? Maybe because of the definition of (greater (!) than)? Or do you expect 1 to be greater than 1 and not greater than 2, 3, 4, and 5? Regards -- Gerrit - AOR Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32109http://www.uni-giessen.de/cms/eichner - __ 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] Logical vectors
Hi Joshua, Thanks for your advice. assign(x = temp, value = 1:5 1) using the assign function (not often recommended) to avoid any confusion with the assignment operator, -. temp [1] FALSE TRUE TRUE TRUE TRUE I got it. Thanks B.R. Stephen L - Original Message From: Joshua Wiley jwiley.ps...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Thu, November 4, 2010 2:46:15 PM Subject: Re: [R] Logical vectors On Wed, Nov 3, 2010 at 10:50 PM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Pls help me to understand follow; An Introduction to R 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics 1) x [1] 1 2 3 4 5 a vector, x, is defined with 5 elements, {1, 2, 3, 4, 5} temp - x != 1 perform the logical test that x does not equal 1 returning either TRUE or FALSE. 1 = 1 so TRUE, 2 != 1 so FALSE, etc. next we assign *the results* of the logical test to the vector 'temp' temp [1] FALSE TRUE TRUE TRUE TRUE print the vector to screen 2) x [1] 1 2 3 4 5 note that x has not changed here, we assigned to temp, not to x. temp - x 1 now we assign the results of the logical test, x 1 {1 = 1 so FALSE, 2 1 so TRUE, 3 1 so TRUE, 4 1 so TRUE, 5 1 so TRUE} we assign these results to a vector, 'temp'. This *new* assignment overwrites the old vector 'temp' temp [1] FALSE TRUE TRUE TRUE TRUE print temp to screen, this is the results of our second logical test (x 1). Why NOT temp [1] TRUE FALSE FALSE FALSE FALSE My best guess of where you got confused is that we assigned the results to 'temp', so 'x' remained unchanged {1, 2, 3, 4, 5}, or that you confused '-' which is the assignment operator in R, to less than negative... *OR* less than or equal. We could write this equivalently: 1:5 1 [1] FALSE TRUE TRUE TRUE TRUE this was the logical test, whose results were assigned to the vector, temp. assign(x = temp, value = 1:5 1) using the assign function (not often recommended) to avoid any confusion with the assignment operator, -. temp [1] FALSE TRUE TRUE TRUE TRUE print to screen HTH, Josh ? TIA B.R. Stephen L __ 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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.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] Logical vectors
H Gerrit, the phrase exact equality refers to the operator ==, i. e. to the last element == in the enumeration (, =, , =, ==), and not to its first. x - 1:5 x [1] 1 2 3 4 5 temp -x == 1 temp [1] TRUE FALSE FALSE FALSE FALSE I got it thanks. B.R. Stephen L - Original Message From: Gerrit Eichner gerrit.eich...@math.uni-giessen.de To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Thu, November 4, 2010 4:56:42 PM Subject: Re: [R] Logical vectors On Thu, 4 Nov 2010, Stephen Liu wrote: [snip] In; 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics It states:- The logical operators are , =, , =, == for exact equality and != for inequality # exact equality != # inequality [snip] Hello, Stephen, in my understanding of the sentence The logical operators are , =, , =, == for exact equality and != for inequality the phrase exact equality refers to the operator ==, i. e. to the last element == in the enumeration (, =, , =, ==), and not to its first. Regards -- Gerrit - AOR Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany Fax: +49-(0)641-99-32109http://www.uni-giessen.de/cms/eichner - __ 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] Logical vectors
Hi Ted, Thanks for your advice and the correction on the document concerned. B.R. Stephen L - Original Message From: ted.hard...@wlandres.net ted.hard...@wlandres.net To: r-help@r-project.org Cc: Stephen Liu sati...@yahoo.com; R-Devel r-de...@stat.math.ethz.ch Sent: Thu, November 4, 2010 5:08:42 PM Subject: Re: [R] Logical vectors On 04-Nov-10 08:56:42, Gerrit Eichner wrote: On Thu, 4 Nov 2010, Stephen Liu wrote: [snip] In; 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics It states:- The logical operators are , =, , =, == for exact equality and != for inequality # exact equality != # inequality [snip] Hello, Stephen, in my understanding of the sentence The logical operators are , =, , =, == for exact equality and != for inequality the phrase exact equality refers to the operator ==, i. e. to the last element == in the enumeration (, =, , =, ==), and not to its first. Regards -- Gerrit This indicates that the sentence can be mis-read. It should be cured by a small change in punctuation (hence I copy to R-devel): The logical operators are , =, , =; == for exact equality; and != for inequality Hoping this helps! Ted. E-Mail: (Ted Harding) ted.hard...@wlandres.net Fax-to-email: +44 (0)870 094 0861 Date: 04-Nov-10 Time: 09:08:37 -- XFMail -- __ 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] setting attributes
Hi folks, An Introduction to R 3.3 Getting and setting attributes http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment z - 0:9 z [1] 0 1 2 3 4 5 6 7 8 9 attr(z, dim) - c(10,10) Error in attr(z, dim) - c(10, 10) : dims [product 100] do not match the length of object [10] Please help me to understand what mistake I committed? TIA B.R. Stephen L __ 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] setting attributes
Hi David, I'm learning R following the tutorial mentioned, nothing else. I got an error running the code. Please help. B.R. Stephen L - Original Message From: David Winsemius dwinsem...@comcast.net To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Fri, November 5, 2010 12:18:23 PM Subject: Re: [R] setting attributes On Nov 5, 2010, at 12:05 AM, Stephen Liu wrote: Hi folks, An Introduction to R 3.3 Getting and setting attributes http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment z - 0:9 z [1] 0 1 2 3 4 5 6 7 8 9 attr(z, dim) - c(10,10) Error in attr(z, dim) - c(10, 10) : dims [product 100] do not match the length of object [10] Please help me to understand what mistake I committed? TIA If you want a 10 x 10 matrix then: zm - matrix(z, 10, 10) # positional arguments to nrow and ncol. If you were trying for something else, then please explain in plain English rather than simply showing code that throws an error. David Winsemius, MD West Hartford, CT __ 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] setting attributes (SOLVED)
Hi Mike, I got it done. Thanks Your advice:- z - rep(0:9, each = 10) z [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]012345678 9 [2,]012345678 9 [3,]012345678 9 [4,]012345678 9 [5,]012345678 9 [6,]012345678 9 [7,]012345678 9 [8,]012345678 9 [9,]012345678 9 [10,]012345678 9 attr(z, dim) - c(10,10) attr function (x, which, exact = FALSE) .Primitive(attr) attr(z, dim) [1] 10 10 David's advice:- z - 0:9 z - matrix(z, 10, 10) z [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]000000000 0 [2,]111111111 1 [3,]222222222 2 [4,]333333333 3 [5,]444444444 4 [6,]555555555 5 [7,]666666666 6 [8,]777777777 7 [9,]888888888 8 [10,]999999999 9 attr(z, dim) - c(10,10) attr(z, dim) [1] 10 10 attr function (x, which, exact = FALSE) .Primitive(attr) The learning curve of R is rather steep at start. B.R. Stephen L - Original Message From: Michael Sumner mdsum...@gmail.com To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Fri, November 5, 2010 12:44:08 PM Subject: Re: [R] setting attributes David did help already, but if you want literally what the Introduction uses then you'll need a vector with as many elements as the final matrix (in David's example recyling applies to give 100 elements from the original 10). z - rep(0:9, each = 10) attr(z, dim) - c(10,10) That's simply a different route to the one shown by David, where the repetition of z values is made explicit. Cheers, Mike. On Fri, Nov 5, 2010 at 3:32 PM, Stephen Liu sati...@yahoo.com wrote: Hi David, I'm learning R following the tutorial mentioned, nothing else. I got an error running the code. Please help. B.R. Stephen L - Original Message From: David Winsemius dwinsem...@comcast.net To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Fri, November 5, 2010 12:18:23 PM Subject: Re: [R] setting attributes On Nov 5, 2010, at 12:05 AM, Stephen Liu wrote: Hi folks, An Introduction to R 3.3 Getting and setting attributes http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment z - 0:9 z [1] 0 1 2 3 4 5 6 7 8 9 attr(z, dim) - c(10,10) Error in attr(z, dim) - c(10, 10) : dims [product 100] do not match the length of object [10] Please help me to understand what mistake I committed? TIA If you want a 10 x 10 matrix then: zm - matrix(z, 10, 10) # positional arguments to nrow and ncol. If you were trying for something else, then please explain in plain English rather than simply showing code that throws an error. David Winsemius, MD West Hartford, CT __ 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. -- Michael Sumner Institute for Marine and Antarctic Studies, University of Tasmania Hobart, Australia e-mail: mdsum...@gmail.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] setting attributes (SOLVED)
From: Erik Iverson er...@ccbr.umn.edu To: r-help@r-project.org Sent: Fri, November 5, 2010 1:09:19 PM Subject: Re: [R] setting attributes (SOLVED) The learning curve of R is rather steep at start. Yes, it can be. I think the general advice would be to get a good Intro to R book if you're just starting out. That's certainly my advice. Or, get a book on some methods you're interested in that uses R (the Springer useR! series is really useful for this.) Hi Erik, Thanks for your advice. I found useR; Use R http://www.springer.com/series/6991 Actually I have a good collection of tutorials and technical documentation on R. I found it difficult going through all in a short span. Particularly I have to practice the examples. How to use R http://en.wikiversity.org/wiki/How_to_use_R is good link. B.R. Stephen L __ 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-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] longer object length is not a multiple of shorter object length
Hi folks, I'm following An Introduction to R http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics to learn R. Coming to; 2.2 Vector arithmetic v - 2*x + y + 1 Warning message: In 2 * x + y : longer object length is not a multiple of shorter object length What does it mean? How to rectify it? Please help. TIA B.R. Stephen L __ 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] longer object length is not a multiple of shorter object length
- Original Message From: David Winsemius dwinsem...@comcast.net To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Wed, November 3, 2010 11:03:18 PM Subject: Re: [R] longer object length is not a multiple of shorter object length - snip - v - 2*x + y + 1 Warning message: In 2 * x + y : longer object length is not a multiple of shorter object length What does it mean? How to rectify it? Please help. TIA What does this return: c(length(x), length(y)) # ? c(length(x), length(y)) [1] 5 11 B.R. Stephen L __ 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] Logical vectors
Hi folks, Pls help me to understand follow; An Introduction to R 2.4 Logical vectors http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics 1) x [1] 1 2 3 4 5 temp - x != 1 temp [1] FALSE TRUE TRUE TRUE TRUE 2) x [1] 1 2 3 4 5 temp - x 1 temp [1] FALSE TRUE TRUE TRUE TRUE Why NOT temp [1] TRUE FALSE FALSE FALSE FALSE ? TIA B.R. Stephen L __ 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 on ESS
Hi folks, Debian 504 64-bit Emacs Version 22.1.1 I have Emacs+ESS running on the box. R can work on ESS. But the fonts on the menu bar (top) of Emacs are NOT clear, difficult to read, grey foreground. I have been googling around for solution without result. Please help. TIA B.R. Stephen L __ 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] How to check the available of a package on R repo
Hi folks, Debian 504 64-bit What is the correct syntax to check the available of a package on R repo? available.packages(emacs, OS_type=linux) Warning: unable to access index for repository emacs Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License File Repository available.packages(emacs) Warning: unable to access index for repository emacs Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License File Repository TIA B.R. Stephen L __ 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] How to check the available of a package on R repo
Hi Erik, I try to find out whether Emacs/ESS is available on R repo. What is its versiohn? B.R. Stephen L - Original Message From: Erik Iverson er...@ccbr.umn.edu To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, September 18, 2010 12:01:47 PM Subject: Re: [R] How to check the available of a package on R repo What are you trying to do? Did you look at the arguments for the first argument of ?available.packages ? What did you expect emacs to do? On 09/17/2010 10:20 PM, Stephen Liu wrote: Hi folks, Debian 504 64-bit What is the correct syntax to check the available of a package on R repo? available.packages(emacs, OS_type=linux) Warning: unable to access index for repository emacs Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License File Repository available.packages(emacs) Warning: unable to access index for repository emacs Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License File Repository TIA B.R. Stephen L __ 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-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 on ESS (SOLVED)
Hi Erik, I have Emacs 22 upgraded to Emacs 23. The latter is available on Debian backport repo. The menu is very clear and easy to read. Thanks B.R. Stephen L - Original Message From: Erik Iverson er...@ccbr.umn.edu To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Sat, September 18, 2010 11:08:17 AM Subject: Re: [R] R on ESS On 09/17/2010 09:52 PM, Stephen Liu wrote: Hi folks, Debian 504 64-bit Emacs Version 22.1.1 I have Emacs+ESS running on the box. R can work on ESS. But the fonts on the menu bar (top) of Emacs are NOT clear, difficult to read, grey foreground. I have been googling around for solution without result. Please help. Very hard to say since it probably is a function of any particulars on the system, including how Emacs was compiled. I would recommend using a newer Emacs if possible. Versions 23 and newer have the ability to use antialiased fonts, which many find more pleasing. (Some don't.). This also is an Emacs question, so you should either ask on an Emacs mailing list (although I see you already did ask on emacs-help), or on ESS-help, but not R-help. __ 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] help manual on R on ESS
Hi folks, R on ESS Why it is unable to pop up help manual on R on ESS? ?layout Error in help(layout, htmlhelp = FALSE) : unused argument(s) (htmlhelp = FALS ?plot Error in help(plot, htmlhelp = FALSE) : unused argument(s) (htmlhelp = FALSE) etc. But they work on R console and popup the manual without problem. TIA B.R. Stephen L __ 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] Was the package installed correctly
Hi folks, On R install.packages(TeachingDemos, dependencies=TRUE) .. installing to /usr/local/lib/R/site-library/mapproj/libs ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (mapproj) The downloaded packages are in ‘/tmp/Rtmp3CKVAs/downloaded_packages’ Warning messages: 1: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'tkrplot' had non-zero exit status 2: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'rgl' had non-zero exit status What do the warnings indicate? Was the package installed correctly? TIA B.R. Stephen L __ 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] Was the package installed correctly
Hi Bill, Thanks for your advice. OS - Debian 504 64-bit $ apt-cache search rgl r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces r-cran-rgl - GNU R package for three-dimensional visualisation using OpenGL sanduhr - An alarm clock designed as an hourglass $ sudo aptitude install r-cran-rgl no complaint $ apt-cache search tkrplot r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces r-cran-tkrplot - GNU R embedded Tk plotting device package $ apt-cache policy r-cran-tkrplot r-cran-tkrplot: Installed: (none) Candidate: 0.0.18-1 Version table: 0.0.18-1 0 500 http://ftp.hk.debian.org lenny/main Packages $ sudo aptitude install r-cran-tkrplot No complaint Hoping that those are the correct packages needed?? B.R. Stephen L - Original Message From: bill.venab...@csiro.au bill.venab...@csiro.au To: sati...@yahoo.com; r-help@r-project.org Sent: Fri, September 17, 2010 9:09:10 AM Subject: RE: [R] Was the package installed correctly It means that two of the packages on which TeachingDemos depends were not installed correctly, namely rgl and tkplot. The problem could be that you do not have the system dependencies in place. For rgl these are listed as: SystemRequirements:OpenGL, GLU Library, zlib (optional), libpng (=1.2.9, optional), FreeType (optional) The rgl url is URL: http://rgl.neoscientists.org The tklplot package is not so explicit, though. Best of luck. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Liu Sent: Friday, 17 September 2010 10:41 AM To: r-help Subject: [R] Was the package installed correctly Hi folks, On R install.packages(TeachingDemos, dependencies=TRUE) .. installing to /usr/local/lib/R/site-library/mapproj/libs ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (mapproj) The downloaded packages are in '/tmp/Rtmp3CKVAs/downloaded_packages' Warning messages: 1: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'tkrplot' had non-zero exit status 2: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'rgl' had non-zero exit status What do the warnings indicate? Was the package installed correctly? TIA B.R. Stephen L __ 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-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] Was the package installed correctly (SOLVED)
Hi folks, Re: Installation of rgl and tkrplot Problem solved as follows; On Debian 504 64-bit console:- $ sudo aptitude remove r-cran-rgl $ sudo aptitude remove r-cran-tkrplot $ sudo aptitude install libglu1-mesa-dev $ sudo aptitude install tk8.5-dev On R 1) install.packages(rgl, dependencies = TRUE) .. ** R ** demo ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (rgl) The downloaded packages are in ‘/tmp/RtmpYUqOHq/downloaded_packages’ 2) install.packages(tkrplot, dependencies = TRUE) .. ** preparing package for lazy loading Loading Tcl/Tk interface ... done ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (tkrplot) The downloaded packages are in ‘/tmp/RtmpYUqOHq/downloaded_packages’ Thanks B.R. Stephen L - Original Message From: Stephen Liu sati...@yahoo.com To: r-help@r-project.org Sent: Fri, September 17, 2010 10:17:13 AM Subject: Re: [R] Was the package installed correctly Hi Bill, Thanks for your advice. OS - Debian 504 64-bit $ apt-cache search rgl r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces r-cran-rgl - GNU R package for three-dimensional visualisation using OpenGL sanduhr - An alarm clock designed as an hourglass $ sudo aptitude install r-cran-rgl no complaint $ apt-cache search tkrplot r-cran-misc3d - GNU R collection of 3d plot functions and rgl-based isosurfaces r-cran-tkrplot - GNU R embedded Tk plotting device package $ apt-cache policy r-cran-tkrplot r-cran-tkrplot: Installed: (none) Candidate: 0.0.18-1 Version table: 0.0.18-1 0 500 http://ftp.hk.debian.org lenny/main Packages $ sudo aptitude install r-cran-tkrplot No complaint Hoping that those are the correct packages needed?? B.R. Stephen L - Original Message From: bill.venab...@csiro.au bill.venab...@csiro.au To: sati...@yahoo.com; r-help@r-project.org Sent: Fri, September 17, 2010 9:09:10 AM Subject: RE: [R] Was the package installed correctly It means that two of the packages on which TeachingDemos depends were not installed correctly, namely rgl and tkplot. The problem could be that you do not have the system dependencies in place. For rgl these are listed as: SystemRequirements:OpenGL, GLU Library, zlib (optional), libpng (=1.2.9, optional), FreeType (optional) The rgl url is URL: http://rgl.neoscientists.org The tklplot package is not so explicit, though. Best of luck. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Liu Sent: Friday, 17 September 2010 10:41 AM To: r-help Subject: [R] Was the package installed correctly Hi folks, On R install.packages(TeachingDemos, dependencies=TRUE) .. installing to /usr/local/lib/R/site-library/mapproj/libs ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (mapproj) The downloaded packages are in '/tmp/Rtmp3CKVAs/downloaded_packages' Warning messages: 1: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'tkrplot' had non-zero exit status 2: In install.packages(TeachingDemos, dependencies = TRUE) : installation of package 'rgl' had non-zero exit status What do the warnings indicate? Was the package installed correctly? TIA B.R. Stephen L __ 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-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-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] About choosing file
Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de To: Stephen Liu sati...@yahoo.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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-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] About choosing file
Hi Henrique, Thanks for your advice which works for me. B.R. Stephen L From: Henrique Dallazuanna www...@gmail.com Cc: R-help@r-project.org Sent: Wed, September 15, 2010 10:24:01 PM Subject: Re: [R] About choosing file You can try tcltk: library(tcltk) tk_choose.files() Hi Uwe, (assuming R-2.11.1) Yes Test01=read.table(file.choose(), header=TRUE) Enter file name: My problem here is ; the file is NOT on /home/user directory. I need to browse for it. list.files() [1] boxplot.pdf Desktop FourPlots01.png hist.png [5] jranke_cran.asc M-x R M-x R~ B.R. Stephen L - Original Message From: Uwe Ligges lig...@statistik.tu-dortmund.de Cc: R-help@r-project.org Sent: Wed, September 15, 2010 9:20:48 PM Subject: Re: [R] About choosing file On 26.08.2010 09:50, Stephen Liu wrote: Hi folks, Following command only works on Windows Test01=read.table(file.choose(), header=TRUE) It popup open a dialog box for choosing file. But it doesn't work on Linux (Ubuntu); Test01=read.table(file.choose(), header=TRUE) Enter file name: Entering file name doesn't work. Please advise. TIA (assuming R-2.11.1) Why not? What happens? What is the error message? Which file did you specify and does list.files() lists the file? Please show the output. Best, Uwe Ligges B.R. Stephen L __ 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-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]] __ 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.