Re: [Rd] buglet in hjelp("[<-")
On Sun, 13 Aug 2006, Kjetil Brinchmann Halvorsen wrote: > Hola! > > The details section of help("[<-") contains in the Details section > > Subsetting (except by an empty index) will drop all attributes except > names, dim and dinmanes. > > I guess dinmanes means dimnames! Yes, thank you. (And 'hjelp' means 'help'?) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] bypassing SET_DIM checking
Hi, I am not going to work out why you code crashes, but I did manage to bypass dim checking some time ago - and as others had replied, it is Not a Good Idea (TM) , as the check is there for a reason. If you really want to do it, here is the relevant snipplet of what I did (oh, I did copy installAttrib() from R/src/main/attrib.c - it is declared static there so you can cut-and-paste the whole routine to your code) - but as others had said, it is Not a Good Idea: ... SEXP ans, dim, dimnames, class; ... PROTECT(dim = allocVector(INTSXP, 2)); ... INTEGER(dim)[0] = i; INTEGER(dim)[1] = j; ... PROTECT(dimnames = allocVector(VECSXP, 2)); SET_VECTOR_ELT(dimnames, 0, R_NilValue); SET_VECTOR_ELT(dimnames, 1, R_NilValue); ... /* we bypassed the checks for Dimname and Dim */ installAttrib(ans, R_DimNamesSymbol, dimnames); installAttrib(ans, R_DimSymbol, dim); ... return ans; ... Hin-Tak Leung miguel manese wrote: > Hello, > > I created an S3 "type" w/c is actually a list that should look like a > matrix but whose data is actually in an external file. The SEXP just > contains info on how to retrieve the data from the file. When I get to > the part of creating the SEXP, I found out that SET_DIM & SET_DIMNAME > checks the SEXP if the length matches (somewhere in src/main/attrib.c, > dimgets & dimnamegets IIRC (it's on my other partition. life sucks)). > After a quick look at the R code, I tried to bypass them by doing: > > static void _installAttrib(SEXP obj, SEXP name, SEXP value) { > /* to bypass dim & dimnames property checking */ > SEXP attr, cur_attr; > PROTECT(attr = NEW_LIST(1)); > SETCAR(attr, value); > SET_TAG(attr, name); > if (ATTRIB(obj) == R_NilValue) SET_ATTRIB(obj, attr); > else { > cur_attr = nthcdr(ATTRIB(obj), length(ATTRIB(obj)) - 1); > SETCDR(cur_attr, attr); > } > UNPROTECT(1); > } > > but it crashes R. Is there any other way to do this other than copying > those code in R that was not included in the API ? > > Thanks, > M. Manese > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] configure on mac
Hi Roger, due to latest change in the build scripts, you need to get the latest apple dev tools to correctly build r-devel. In particular, libtool needs to be updated. This is contained in the latest apple dev (XCode 2.3 as other mentioned) on apple developer web site. stefano On 12/ago/06, at 18:56, roger koenker wrote: > I'm having trouble making yesterday's R-devel on my macs. > > ./configure seems fine, but eventually in make I get: > > gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined > dynamic_lookup -single_module -multiply_defined suppress -L/sw/lib -L/ > usr/local/lib -install_name libR.dylib -compatibility_version 2.4.0 - > current_version 2.4.0 -headerpad_max_install_names -o libR.dylib > Rembedded.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o > RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o > builtin.o character.o coerce.o colors.o complex.o connections.o > context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o > dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o > eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o > identical.o internet.o iosupport.o lapack.o list.o localecharset.o > logic.o main.o mapply.o match.o memory.o model.o names.o objects.o > optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o > plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o > qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o > scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o > startup.o subassign.o subscript.o subset.o summary.o sysutils.o > unique.o util.o version.o vfonts.o xxxpr.o `ls ../appl/*.o ../nmath/ > *.o ../unix/*.o 2>/dev/null|grep -v /ext-` -framework vecLib - > lgfortran -lgcc_s -lSystemStubs -lmx -lSystem ../extra/zlib/ > libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lintl - > liconv -Wl,-framework -Wl,CoreFoundation -lreadline -lm -liconv > /usr/bin/libtool: unknown option character `m' in: -macosx_version_min > Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile > [,dirname]] [-arch_only arch] [-sacLT] > Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile > [,dirname]] [-arch_only arch] [-o output] [-install_name name] [- > compatibility_version #] [-current_version #] [-seg1addr 0x#] [- > segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table > ] [-seg_addr_table_filename ] [-all_load] > [-noall_load] > make[3]: *** [libR.dylib] Error 1 > make[2]: *** [R] Error 2 > make[1]: *** [R] Error 1 > make: *** [R] Error 1 > > This was ok as of my last build which was: > >> version > _ > platform powerpc-apple-darwin8.7.0 > arch powerpc > os darwin8.7.0 > system powerpc, darwin8.7.0 > status Under development (unstable) > major 2 > minor 4.0 > year 2006 > month 07 > day28 > svn rev38710 > language R > version.string R version 2.4.0 Under development (unstable) > (2006-07-28 r38710) > > url:www.econ.uiuc.edu/~rogerRoger Koenker > email [EMAIL PROTECTED] Department of > Economics > vox:217-333-4558University of Illinois > fax:217-244-6678Champaign, IL 61820 > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] configure on mac
Yes, upgrading to Xcode 2.4 worked perfectly. Thanks to all. url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 On Aug 14, 2006, at 8:07 AM, stefano iacus wrote: > Hi Roger, > due to latest change in the build scripts, you need to get the > latest apple dev tools to correctly build r-devel. In particular, > libtool needs to be updated. This is contained in the latest apple > dev (XCode 2.3 as other mentioned) on apple developer web site. > stefano > > On 12/ago/06, at 18:56, roger koenker wrote: > >> I'm having trouble making yesterday's R-devel on my macs. >> >> ./configure seems fine, but eventually in make I get: >> >> gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined >> dynamic_lookup -single_module -multiply_defined suppress -L/sw/lib >> -L/ >> usr/local/lib -install_name libR.dylib -compatibility_version >> 2.4.0 - >> current_version 2.4.0 -headerpad_max_install_names -o libR.dylib >> Rembedded.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o >> RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o >> builtin.o character.o coerce.o colors.o complex.o connections.o >> context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o >> dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o >> eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o >> identical.o internet.o iosupport.o lapack.o list.o localecharset.o >> logic.o main.o mapply.o match.o memory.o model.o names.o objects.o >> optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o >> plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o >> qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o >> scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o >> startup.o subassign.o subscript.o subset.o summary.o sysutils.o >> unique.o util.o version.o vfonts.o xxxpr.o `ls ../appl/*.o ../ >> nmath/ >> *.o ../unix/*.o 2>/dev/null|grep -v /ext-` -framework vecLib - >> lgfortran -lgcc_s -lSystemStubs -lmx -lSystem ../extra/zlib/ >> libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lintl - >> liconv -Wl,-framework -Wl,CoreFoundation -lreadline -lm -liconv >> /usr/bin/libtool: unknown option character `m' in: - >> macosx_version_min >> Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile >> [,dirname]] [-arch_only arch] [-sacLT] >> Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile >> [,dirname]] [-arch_only arch] [-o output] [-install_name name] [- >> compatibility_version #] [-current_version #] [-seg1addr 0x#] [- >> segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table >> ] [-seg_addr_table_filename ] [-all_load] >> [-noall_load] >> make[3]: *** [libR.dylib] Error 1 >> make[2]: *** [R] Error 2 >> make[1]: *** [R] Error 1 >> make: *** [R] Error 1 >> >> This was ok as of my last build which was: >> >>> version >> _ >> platform powerpc-apple-darwin8.7.0 >> arch powerpc >> os darwin8.7.0 >> system powerpc, darwin8.7.0 >> status Under development (unstable) >> major 2 >> minor 4.0 >> year 2006 >> month 07 >> day28 >> svn rev38710 >> language R >> version.string R version 2.4.0 Under development (unstable) >> (2006-07-28 r38710) >> >> url:www.econ.uiuc.edu/~rogerRoger Koenker >> email [EMAIL PROTECTED] Department of >> Economics >> vox:217-333-4558University of >> Illinois >> fax:217-244-6678Champaign, IL 61820 >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] configure on mac
My prior message now seems a bit premature. R seemed fine and, for example, installed my package SparseM without complaint, but now trying to install quantreg or Matrix, I'm getting: gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup -single_module -multiply_defined suppress -L/sw/lib -L/ usr/local/lib -o quantreg.so akj.o boot.o bound.o boundc.o chlfct.o cholesky.o dsel05.o extract.o kuantile.o mcmb.o penalty.o qrcens.o rls.o rq1.o rqbr.o rqfn.o rqfnb.o rqfnc.o sparskit2.o srqfn.o srqfnc.o srtpai.o xlapack.o -L/Library/Frameworks/R.framework/ Resources/lib -lRblas -L/usr/local/lib/gcc/powerpc-apple- darwin8/4.0.0 -L/usr/local/lib/gcc -lgfortran -lgcc_s -lSystemStubs - lmx -lSystem -F/Library/Frameworks/R.framework/.. -framework R ld: multiple definitions of symbol __gfortran_filename /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single module) definition of __gfortran_filename /usr/local/lib/libgfortran.a(error.o) definition of __gfortran_filename in section (__DATA,__data) ld: multiple definitions of symbol __gfortran_line /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single module) definition of __gfortran_line . . . /usr/bin/libtool: internal link edit command failed make: *** [quantreg.so] Error 1 ERROR: compilation failed for package 'quantreg' Any further suggestions would be very welcome. Roger url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 On Aug 14, 2006, at 8:15 AM, roger koenker wrote: > Yes, upgrading to Xcode 2.4 worked perfectly. Thanks to all. > > url:www.econ.uiuc.edu/~rogerRoger Koenker > email[EMAIL PROTECTED]Department of Economics > vox: 217-333-4558University of Illinois > fax: 217-244-6678Champaign, IL 61820 > > > On Aug 14, 2006, at 8:07 AM, stefano iacus wrote: > >> Hi Roger, >> due to latest change in the build scripts, you need to get the >> latest apple dev tools to correctly build r-devel. In particular, >> libtool needs to be updated. This is contained in the latest apple >> dev (XCode 2.3 as other mentioned) on apple developer web site. >> stefano >> >> On 12/ago/06, at 18:56, roger koenker wrote: >> >>> I'm having trouble making yesterday's R-devel on my macs. >>> >>> ./configure seems fine, but eventually in make I get: >>> >>> gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined >>> dynamic_lookup -single_module -multiply_defined suppress -L/sw/ >>> lib -L/ >>> usr/local/lib -install_name libR.dylib -compatibility_version >>> 2.4.0 - >>> current_version 2.4.0 -headerpad_max_install_names -o libR.dylib >>> Rembedded.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o >>> RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o >>> builtin.o character.o coerce.o colors.o complex.o connections.o >>> context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o >>> dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o >>> eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o >>> identical.o internet.o iosupport.o lapack.o list.o localecharset.o >>> logic.o main.o mapply.o match.o memory.o model.o names.o objects.o >>> optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o >>> plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o >>> qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o >>> scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o >>> startup.o subassign.o subscript.o subset.o summary.o sysutils.o >>> unique.o util.o version.o vfonts.o xxxpr.o `ls ../appl/*.o ../ >>> nmath/ >>> *.o ../unix/*.o 2>/dev/null|grep -v /ext-` -framework vecLib - >>> lgfortran -lgcc_s -lSystemStubs -lmx -lSystem ../extra/zlib/ >>> libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lintl - >>> liconv -Wl,-framework -Wl,CoreFoundation -lreadline -lm -liconv >>> /usr/bin/libtool: unknown option character `m' in: - >>> macosx_version_min >>> Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile >>> [,dirname]] [-arch_only arch] [-sacLT] >>> Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile >>> [,dirname]] [-arch_only arch] [-o output] [-install_name name] [- >>> compatibility_version #] [-current_version #] [-seg1addr 0x#] [- >>> segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [- >>> seg_addr_table >>> ] [-seg_addr_table_filename ] [- >>> all_load] >>> [-noall_load] >>> make[3]: *** [libR.dylib] Error 1 >>> make[2]: *** [R] Error 2 >>> make[1]: *** [R] Error 1 >>> make: *** [R] Error 1 >>> >>> This was ok as of my last build which was: >>> version >>> _ >>> platform powerpc-apple-darwin8.7.0 >>> arch powerpc >>> os darwin8.7.0 >>> system
[Rd] plot with Julian date (PR#9145)
Full_Name: Chanseok Park Version: 2.3.1 OS: RHEL Submission from: (NULL) (130.127.112.89) Dear Sir/Madam: I wrote some examples below. The plot() function is not working properly with Julian date. For example, log="" should be a default option, but without the repetition of this default option in plot(), we can not draw it especially with Julian date. So, maybe, the plot() function might not be compatible with as.date(). Thanks, C. Park ## library(survival) dat=c("12-5-1995", "12-30-1995", "8-27-1996", "11-20-1996", "8-29-1997" ) miles = c(106, 1468, 7298, 7935, 13440 ) jdat = as.date(dat) plot( jdat, miles ) ## Not working plot( jdat, miles, log="" ) ## Works plot( jdat, miles, type="l") ## Not working plot( jdat, miles, log="", type="l") ## works with WARNING ##=== ## Let's use as.Date() and as.date(). jdat = as.Date( as.date(dat) ) plot( jdat, miles ) ## Works plot( jdat, miles, log="" ) ## Works plot( jdat, miles, type="l") ## WOrks __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] configure on mac
It seems that there are symbols defined in more than one header. This causes problems on mac. You should define the symbol in one header and declare elsewhere as extern. You can find examples in main.c (if I remember well). I'm not sure this is the problems, but it looks like stefano On 14/ago/06, at 18:36, roger koenker wrote: > My prior message now seems a bit premature. R seemed fine and, for > example, installed my package SparseM without complaint, but now > trying to install quantreg or Matrix, I'm getting: > > gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined > dynamic_lookup -single_module -multiply_defined suppress -L/sw/lib - > L/usr/local/lib -o quantreg.so akj.o boot.o bound.o boundc.o > chlfct.o cholesky.o dsel05.o extract.o kuantile.o mcmb.o penalty.o > qrcens.o rls.o rq1.o rqbr.o rqfn.o rqfnb.o rqfnc.o sparskit2.o > srqfn.o srqfnc.o srtpai.o xlapack.o -L/Library/Frameworks/ > R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/powerpc- > apple-darwin8/4.0.0 -L/usr/local/lib/gcc -lgfortran -lgcc_s - > lSystemStubs -lmx -lSystem -F/Library/Frameworks/R.framework/.. - > framework R > ld: multiple definitions of symbol __gfortran_filename > /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single > module) definition of __gfortran_filename > /usr/local/lib/libgfortran.a(error.o) definition of > __gfortran_filename in section (__DATA,__data) > ld: multiple definitions of symbol __gfortran_line > /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single > module) definition of __gfortran_line > . > . > . > /usr/bin/libtool: internal link edit command failed > make: *** [quantreg.so] Error 1 > ERROR: compilation failed for package 'quantreg' > > Any further suggestions would be very welcome. > > Roger > > url:www.econ.uiuc.edu/~rogerRoger Koenker > email[EMAIL PROTECTED]Department of Economics > vox: 217-333-4558University of Illinois > fax: 217-244-6678Champaign, IL 61820 > > > On Aug 14, 2006, at 8:15 AM, roger koenker wrote: > >> Yes, upgrading to Xcode 2.4 worked perfectly. Thanks to all. >> >> url:www.econ.uiuc.edu/~rogerRoger Koenker >> email[EMAIL PROTECTED]Department of Economics >> vox: 217-333-4558University of Illinois >> fax: 217-244-6678Champaign, IL 61820 >> >> >> On Aug 14, 2006, at 8:07 AM, stefano iacus wrote: >> >>> Hi Roger, >>> due to latest change in the build scripts, you need to get the >>> latest apple dev tools to correctly build r-devel. In particular, >>> libtool needs to be updated. This is contained in the latest >>> apple dev (XCode 2.3 as other mentioned) on apple developer web >>> site. >>> stefano >>> >>> On 12/ago/06, at 18:56, roger koenker wrote: >>> I'm having trouble making yesterday's R-devel on my macs. ./configure seems fine, but eventually in make I get: gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined dynamic_lookup -single_module -multiply_defined suppress -L/sw/ lib -L/ usr/local/lib -install_name libR.dylib -compatibility_version 2.4.0 - current_version 2.4.0 -headerpad_max_install_names -o libR.dylib Rembedded.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o identical.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o model.o names.o objects.o optim.o optimize.o options.o par.o paste.o pcre.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o regex.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o `ls ../appl/*.o ../ nmath/ *.o ../unix/*.o 2>/dev/null|grep -v /ext-` -framework vecLib - lgfortran -lgcc_s -lSystemStubs -lmx -lSystem ../extra/zlib/ libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a -lintl - liconv -Wl,-framework -Wl,CoreFoundation -lreadline -lm -liconv /usr/bin/libtool: unknown option character `m' in: - macosx_version_min Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile [,dirname]] [-arch_only arch] [-sacLT] Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile [,dirname]] [-arch_only arch] [-o output] [-install_name name] [- compatibility_version #] [-current_version #] [-seg1addr 0x#]
[Rd] Data frames and row names
In R-devel v2.4.0 NEWS: o The 'row.names' of a data frame may be stored internally as an integer or character vector. This can result in considerably more compact storage (and more logical row names from rbind) when the row.names are 1:nrow(x). However, such data frames are not compatible with earlier versions of R: this can be ensured by supplying a character vector as 'row.names'. This is great. With row.names == NULL for 1:nrow(x) the storage would be even more compact. I noticed that the number of rows is inferred from row names: > dim.data.frame function (x) c(length(attr(x, "row.names")), length(x)) but couldn't the number of rows be inferred from the first column, if there are no row names? I realize that this would break the case with zero-column data frames, e.g. > df <- data.frame(a=1:10) > df[,-1] NULL data frame with 10 rows. ...but maybe there is a way around that too. Cheers /H __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] configure on mac
On Tue, 15 Aug 2006, stefano iacus wrote: > It seems that there are symbols defined in more than one header. This > causes problems on mac. You should define the symbol in one header > and declare elsewhere as extern. You can find examples in main.c (if > I remember well). > I'm not sure this is the problems, but it looks like One of the reasons given by Simon for this change was that was no longer a problem: see the last sentence of o MacOS X 10.3 and higher now use two-level namespaces, single module in a shared library and allow undefined symbols to be resolved at run-time. This implies that common symbols are now allowed in package libraries. What apparently is a problem is having the same entry point in multiple dynamic libraries (we have had to deal with LSAME, NEWS item two up). I think this means that having arranged specially to satisfy symbols on MacOS, we now need to change it, so in src/extra/blas/Makefile.in Rblas_la_LIBADD = @RBLAS_LDFLAGS@ @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(FLIBS) '@DYLIB_UNDEFINED_ALLOWED_FALSE@' needs to be '#'. and we may then need to link against $(FLIBS) elsewhere. We need Simon's input: to the rest of us the ever-increasing number of ways that MacOS needs special pampering is a mystery. > stefano > > On 14/ago/06, at 18:36, roger koenker wrote: > > > My prior message now seems a bit premature. R seemed fine and, for > > example, installed my package SparseM without complaint, but now > > trying to install quantreg or Matrix, I'm getting: > > > > gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined > > dynamic_lookup -single_module -multiply_defined suppress -L/sw/lib - > > L/usr/local/lib -o quantreg.so akj.o boot.o bound.o boundc.o > > chlfct.o cholesky.o dsel05.o extract.o kuantile.o mcmb.o penalty.o > > qrcens.o rls.o rq1.o rqbr.o rqfn.o rqfnb.o rqfnc.o sparskit2.o > > srqfn.o srqfnc.o srtpai.o xlapack.o -L/Library/Frameworks/ > > R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/powerpc- > > apple-darwin8/4.0.0 -L/usr/local/lib/gcc -lgfortran -lgcc_s - > > lSystemStubs -lmx -lSystem -F/Library/Frameworks/R.framework/.. - > > framework R > > ld: multiple definitions of symbol __gfortran_filename > > /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single > > module) definition of __gfortran_filename > > /usr/local/lib/libgfortran.a(error.o) definition of > > __gfortran_filename in section (__DATA,__data) > > ld: multiple definitions of symbol __gfortran_line > > /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib(single > > module) definition of __gfortran_line > > . > > . > > . > > /usr/bin/libtool: internal link edit command failed > > make: *** [quantreg.so] Error 1 > > ERROR: compilation failed for package 'quantreg' > > > > Any further suggestions would be very welcome. > > > > Roger > > > > url:www.econ.uiuc.edu/~rogerRoger Koenker > > email[EMAIL PROTECTED]Department of Economics > > vox: 217-333-4558University of Illinois > > fax: 217-244-6678Champaign, IL 61820 > > > > > > On Aug 14, 2006, at 8:15 AM, roger koenker wrote: > > > >> Yes, upgrading to Xcode 2.4 worked perfectly. Thanks to all. > >> > >> url:www.econ.uiuc.edu/~rogerRoger Koenker > >> email[EMAIL PROTECTED]Department of Economics > >> vox: 217-333-4558University of Illinois > >> fax: 217-244-6678Champaign, IL 61820 > >> > >> > >> On Aug 14, 2006, at 8:07 AM, stefano iacus wrote: > >> > >>> Hi Roger, > >>> due to latest change in the build scripts, you need to get the > >>> latest apple dev tools to correctly build r-devel. In particular, > >>> libtool needs to be updated. This is contained in the latest > >>> apple dev (XCode 2.3 as other mentioned) on apple developer web > >>> site. > >>> stefano > >>> > >>> On 12/ago/06, at 18:56, roger koenker wrote: > >>> > I'm having trouble making yesterday's R-devel on my macs. > > ./configure seems fine, but eventually in make I get: > > gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined > dynamic_lookup -single_module -multiply_defined suppress -L/sw/ > lib -L/ > usr/local/lib -install_name libR.dylib -compatibility_version > 2.4.0 - > current_version 2.4.0 -headerpad_max_install_names -o libR.dylib > Rembedded.o CConverters.o CommandLineArgs.o Rdynload.o Renviron.o > RNG.o apply.o arithmetic.o apse.o array.o attrib.o base.o bind.o > builtin.o character.o coerce.o colors.o complex.o connections.o > context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o > dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o > eval.o format.o fourier.o gevents.o gram.o gram-ex.o graphics.o > identical.o internet.o iosupport.o lapack.o list.o localecharset.o > logic.o main.o mapply.o
Re: [Rd] Data frames and row names
On Mon, 14 Aug 2006, Henrik Bengtsson wrote: > In R-devel v2.4.0 NEWS: > > o The 'row.names' of a data frame may be stored internally as an > integer or character vector. This can result in considerably > more compact storage (and more logical row names from rbind) > when the row.names are 1:nrow(x). However, such data frames > are not compatible with earlier versions of R: this can be > ensured by supplying a character vector as 'row.names'. > > This is great. > > With row.names == NULL for 1:nrow(x) the storage would be even more > compact. A few bytes more compact. Some day you may get up to the next few lines of NEWS which say The internal storage of row.names = 1:n just records 'n' for efficiency with very long vectors. (BTW, this is four months' old news, hence my 'some day' comment.) > I noticed that the number of rows is inferred from row > names: > > > dim.data.frame > function (x) > c(length(attr(x, "row.names")), length(x)) > > > but couldn't the number of rows be inferred from the first column, if > there are no row names? I realize that this would break the case with > zero-column data frames, e.g. > > > df <- data.frame(a=1:10) > > df[,-1] > NULL data frame with 10 rows. > > ...but maybe there is a way around that too. Yes, see above. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel