Re: [R] Information installation package sjPlot

2018-01-11 Thread Orvalho Augusto
That is very strange.

I am using Ubuntu 16.04 and managed to install it in less than 5 minutes.

OA

On Wed, Jan 10, 2018 at 12:00 PM, Luca Danieli 
wrote:

> Hi all,
>
> I am new. I am installing the library sjPlot on Ubunto 16.10 and I guess
> it is installing some dependencies. But it is taking more than 1.5 hours,
> is it possible?
>
> It has right now halted (hope momentarily) in installing the package
> 'rstan', particularly the file lang__grammars__statement_grammar_inst.o
>
> Other packages installed include: dygraphs, colourpicker, raster.
>
> Is it good or is something going wrong?
>
> Luca
>
> Get Outlook for Android
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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 -- To UNSUBSCRIBE and more, see
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] RQuantLib

2017-12-29 Thread Orvalho Augusto
Hi Bob,

I don't know what is the cause of your trouble but try this:
1. Download the zip of package.

2. And install it from local zip files. This you find on the Packages menu.

Hope it helps
OA


On Fri, Dec 29, 2017 at 10:31 AM, rsherry8  wrote:

> Joshua,
>
> Thanks for the response. When you said at least version 3.4.0, I upgraded
> to 3.4.2 which I believe is the current version. Now, I attempted to
> install the package RQuantLib but it did not work. Here is what I got:
>
> > install.packages("RQuantLib")
> Installing package into ‘C:/Users/rsher/Documents/R/win-library/3.4’
> (as ‘lib’ is unspecified)
> Warning message:
> package ‘RQuantLib’ is not available (for R version 3.4.2)
>
>
> Please help.
> Thanks,
> Bob Sherry
>
>
> On 12/28/2017 10:28 PM, Joshua Ulrich wrote:
>
>> On Thu, Dec 28, 2017 at 6:02 PM, rsherry8  wrote:
>>
>>> I have recently installed R on my new computer. I also want to install
>>> the
>>> package RQuantLib. So I run the following command and get the following
>>> output:
>>>
>>>   install.packages("RQuantLib")

>>> Installing package into ‘C:/Users/rsher/Documents/R/win-library/3.2’
>>> (as ‘lib’ is unspecified)
>>> --- Please select a CRAN mirror for use in this session ---
>>> Warning message:
>>> package ‘RQuantLib’ is not available (for R version 3.2.4 Revised)
>>>
>>> The package did not install. Am I doing something wrong. Is the package
>>> going to be updated for the latest version of R?
>>>
>>> Windows binary packages are only built for the most current (major)
>> version of R.  You need to upgrade to at least R-3.4.0, or you will
>> have to install RQuantLib (and therefore QuantLib itself) from source.
>>
>> Thanks,
>>> Bob
>>>
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posti
>>> ng-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Principal component analysis with EQUAMAX rotation

2014-06-20 Thread Orvalho Augusto
Dear!

I get this error when I try to install it on my linux PC:
root@orvaquimcism:~# R CMD INSTALL
/mnt/disco/downloads/R/psych_1.4.6.20.tar.gz
Error in rawToChar(block[seq_len(ns)]) :
  embedded nul in string:
'\037\x8b\b\0\0\0\0\0\0\003\xec\xbdk{\xe3Ƒ(\x9c\xaf\xc2\xf3\xf0?\xb4\xa9I\x86\x90
\x8a\0uq\xbc\x86\xf3N\xb1\xd79\xb6ck\xc6\xde=\xab(\xfb@$$\xc1C\0024@J
\x94gy~\xfb[\xb7\xbe\0\004%\xcdxf\xe2d5\x89E\xa0\xd1]}\xab\xae\xae\xaa\xae\xae\x9aU\xb7\xa3\xab\xfd?\xfd\xf9\xc5\xf3'

My PC is:
Xubuntu 12.04 64-bit with R version 3.1.0 (2014-04-10).

Thanks
Orvalho


On Fri, Jun 20, 2014 at 6:36 PM, William Revelle li...@revelle.net wrote:

 Dear Wagner,
   I added the equamax rotation option to the psych package in version
 1.4.6.  This was requested by Sagnik Chakravarty, with a solution by Gunter
 Nickel.

 Unfortunately, the version on CRAN  is 1.4.5, but you can get the working
 prerelease of 1.4.6 (1.4.6.20)  from the alternate repository
 http://personality-project.org/r/  (if using a Mac) or
 http://personality-project.org/r/src/contrib/   if using a PC.

 Thus,

  p3e - principal(Thurstone,3,rotate=equamax)  #will extract the first
 three components and rotate them using equamax.
  p3n - principal(Thurstone,3,rotate=none)   #will give you the
 unrotated 3 component solution
  p3v - principal(Thurstone,3,rotate=varimax) #for the varimax solution

  factor.congruence(list(p3e,p3n,p3v))  #compares the Burt/Tucker
 congruence coefficients for these three solutions


 Let me know if this does what you want.

 Bill


 On Jun 19, 2014, at 2:07 AM, Wagner wagner@gmx.de wrote:

  Hello,
  I need to do a principal component analysis with EQUAMAX-rotation.
  Unfortunately the function principal() I use normally for PCA does not
 offer
  this rotation specification. I could find out that this might be possible
  somehow with the package GPArotation but until now I could not figure out
  how to use this in the principal component analysis.
  Maybe someone can give an example on how to do an equamax-rotation PCA?
  Or is there a function in another package that offers the use of
  equamax-rotation directly?
  Thank you for your help!
 
 
 
  --
  View this message in context:
 http://r.789695.n4.nabble.com/Principal-component-analysis-with-EQUAMAX-rotation-tp4692337.html
  Sent from the R help mailing list archive at Nabble.com.
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 

 William Revelle
 http://personality-project.org/revelle.html
 Professor  http://personality-project.org
 Department of Psychology   http://www.wcas.northwestern.edu/psych/
 Northwestern Universityhttp://www.northwestern.edu/
 Use R for psychology http://personality-project.org/r
 It is 5 minutes to midnighthttp://www.thebulletin.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.


[[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] Reading xlsx files in R

2014-03-07 Thread Orvalho Augusto
Dear Agony you did not place a subject on your message. That prevents
people to help you. So I have corrected.

About your problem. This seems to be related to memory allocated to Java
Virtual Machine on rJava and has been comment online many times (eg:
http://stackoverflow.com/questions/7963393/out-of-memory-error-java-when-using-r-and-xlconnect-package
).

Just do this before the library:
options(java.parameters = -Xmx1024m)
library(rJava)
library(xlsx)


Caveman





On Tue, Mar 4, 2014 at 10:41 PM, Agony agony_...@yahoo.com wrote:

 Dear all,
 I have a problem reading xlsx files in R.
 Could anybody help me how to resolve the problem?


 install.packages(xlsx, dependencies=TRUE)
 library(xlsx)
 library(rJava)

 data - read.xlsx(3.1.xlsx, sheetIndex = 3.1)
 data - read.xlsx(3.1.xlsx, sheetName= a,as.data.frame=TRUE,
 header=TRUE)
 data - read.xlsx(3.1.xlsx, 1)

 the error message is :


 Error in .jcall(RJavaTools, Ljava/lang/Object;, invokeMethod, cl,  :
   java.lang.OutOfMemoryError: GC overhead limit exceeded


 I also have problem in reading Rmpi library.
 I installed it correctly however when I read it by library(Rmpi) I
 received an error message:
 Error : .onLoad failed in loadNamespace() for 'Rmpi', details:
   call: inDL(x, as.logical(local), as.logical(now), ...)
   error: unable to load shared object
 'C:/Users/Amir/Documents/R/win-library/3.0/Rmpi/libs/x64/Rmpi.dll':
   LoadLibrary failure:  The specified module could not be found.

 Error: package or namespace load failed for 'Rmpi'



 My many many thanks your help in advance.
 Best,
 Amir
 [[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.



[[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] installing rJava

2013-07-30 Thread Orvalho Augusto
It is really strange what I see on this output. Your machine is 64 bit
(i386) and the libjvm is being compiled to 32 bit (I do not know what could
elicit such behavior).

Can you try and JDK 6 version?

I am on a ubuntu 12.04 64 bit and I have rJava:
orvaquim@orvaquimcism:~$ R CMD javareconf -e
Java interpreter : /usr/bin/java
Java version : 1.6.0_27
Java home path   : /usr/lib/jvm/java-6-openjdk-amd64/jre
Java compiler: /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI progam
detected JNI cpp flags: -I$(JAVA_HOME)/../include
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic  -O3 -pipe
-g  -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -o conftest.so conftest.o
-L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -ljvm
-L/usr/lib/R/lib -lR

The following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Running: /bin/bash

Hope it helps
Caveman




On Wed, Jul 31, 2013 at 6:28 AM, Erin Hodgess erinm.hodg...@gmail.comwrote:

 Dear R People:

 I am trying to install rJava on an Ubuntu 13.04 64 bit system.  But the
 Java part is causing me fits.  Here is the code:

  install.packages(rJava,depen=TRUE)
 Installing package into ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0’
 (as ‘lib’ is unspecified)
 --- Please select a CRAN mirror for use in this session ---
 trying URL 'http://cran.at.r-project.org/src/contrib/rJava_0.9-4.tar.gz'
 Content type 'application/x-gzip' length 498108 bytes (486 Kb)
 opened URL
 ==
 downloaded 486 Kb

 * installing *source* package ‘rJava’ ...
 ** package ‘rJava’ successfully unpacked and MD5 sums checked
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -std=gnu99 accepts -g... yes
 checking for gcc -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -std=gnu99 -E
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/wait.h that is POSIX.1 compatible... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking sys/time.h usability... yes
 checking sys/time.h presence... yes
 checking for sys/time.h... yes
 checking for unistd.h... (cached) yes
 checking for an ANSI C-conforming const... yes
 checking whether time.h and sys/time.h may both be included... yes
 configure: checking whether gcc -std=gnu99 supports static inline...
 yes
 checking whether setjmp.h is POSIX.1 compatible... yes
 checking whether sigsetjmp is declared... yes
 checking whether siglongjmp is declared... yes
 checking Java support in R... present:
 interpreter : '/usr/lib/jvm/jdk1.7.0_25/jre/bin/java'
 archiver: '/usr/lib/jvm/jdk1.7.0_25/bin/jar'
 compiler: '/usr/lib/jvm/jdk1.7.0_25/bin/javac'
 header prep.: '/usr/lib/jvm/jdk1.7.0_25/bin/javah'
 cpp flags   : ''
 java libs   : ''
 configure: error: One or more Java configuration variables are not set.
 Make sure R is configured with full Java support (including JDK). Run
 R CMD javareconf
 as root to add Java support to R.

 If you don't have root privileges, run
 R CMD javareconf -e
 to set all Java-related variables and then install rJava.

 ERROR: configuration failed for package ‘rJava’
 * removing ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0/rJava’

 The downloaded source packages are in
 ‘/tmp/RtmpSzdy7i/downloaded_packages’
 Warning message:
 In install.packages(rJava, depen = TRUE) :
   installation of package ‘rJava’ had non-zero exit status
  sessionInfo()
 R version 3.0.1 (2013-05-16)
 Platform: x86_64-pc-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=C LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base

 loaded via a namespace (and not attached):
 [1] tcltk_3.0.1 tools_3.0.1
  q()
 Save workspace image? [y/n/c]: y

 Now here is the command line:

 erin@erin-Lenovo-IdeaPad-Y480:~$ sudo R CMD 

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Orvalho Augusto
Thank you for the feedback.

I installed the missing Archive::Zip packge and everthing went fine.

Orvalho


On Thu, Jul 25, 2013 at 3:00 PM, Marc Schwartz marc_schwa...@me.com wrote:

 Hi,

 Perl is still required for WriteXLS. That dependency has not changed.

 What did change is that I removed the requirement for Text::CSV_XS, which
 contains C code in the Perl package source that required compilation and
 therefore could not be included in the WriteXLS CRAN package. The
 compilation process to create the binary is OS and Perl version specific.
 Thus, if not already installed, WriteXLS users would either have to install
 a pre-compiled binary using their Perl or OS package manager or via the CLI
 using 'cpan' and compile during local installation, which requires that
 compiler related tools also be installed, making it a bit more cumbersome.

 I can now include Text::CSV_PP, which is recently stable enough to use and
 is a Perl only implementation of the CSV file parsing functionality found
 in Text::CSV_XS.

 The output below suggests that you have Perl version 5.14 installed but
 that you may be missing Archive::Zip, which based upon my prior research is
 typically installed with most recent Perl distributions. Thus, I did not
 include it in the WriteXLS CRAN package nor do I check for it in
 testPerl(). Archive::Zip is a dependency for Excel::Writer::XLSX, which
 creates the XLSX files in WriteXLS().

 Can you run testPerl() from the WriteXLS package and post back the output
 and also let me know what OS you are running? I presume some Linux
 distribution, albeit feedback from others using the new version of WriteXLS
 on Linux, OSX and Windows have not indicated that Archive::Zip is missing.

 I may then need to update WriteXLS to include Archive::Zip if there are
 some Perl installations that do not include it.

 Thanks,

 Marc


 On Jul 24, 2013, at 11:24 PM, Orvalho Augusto orvaq...@gmail.com wrote:

  Hello!
 
  None can imagine how this package is helpful for me. I might have
  understood wrong... is it correct that WriteXLS doesn't no more require
  Perl?
 
  It is because I got this on my machine:
 WriteXLS(iris, iriscomments.xlsx, AdjWidth = TRUE, BoldHeaderRow
  = TRUE)
  Can't locate Archive/Zip.pm in @INC (@INC contains:
  /usr/local/lib/R/site-library/WriteXLS/Perl /etc/perl
  /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
  /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
  /usr/local/lib/site_perl .) at
  /usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX/Workbook.pm
  line 25.
  BEGIN failed--compilation aborted at
  /usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX/Workbook.pm
  line 25.
  Compilation failed in require at
  /usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX.pm line 18.
  BEGIN failed--compilation aborted at
  /usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX.pm line 18.
  Compilation failed in require at
  /usr/local/lib/R/site-library/WriteXLS/Perl/WriteXLSX.pl line 35.
  BEGIN failed--compilation aborted at
  /usr/local/lib/R/site-library/WriteXLS/Perl/WriteXLSX.pl line 35.
  The Perl script 'WriteXLSX.pl' failed to run successfully.
 
  Thank you
  Caveman
 
 
 
  On Wed, Jul 24, 2013 at 2:27 PM, Marc Schwartz marc_schwa...@me.com
 wrote:
 
  On Jul 23, 2013, at 5:40 PM, cognizio ge...@uyleman.com wrote:
 
  Great summary! It works great without the heavy PERL library. I am
  running
  the YAML package I thought I needed to support WRITEXLS. Do I need it
 or
  is
  YAML not a dependency?
 
  Other question is on your last point: 'WRITEXLS COMMENT:' now shows up
  across the first row of the data output in the XLS. How do I modify
 these
  values?
 
  Thx!
 
  Cog
 
 
  Hi,
 
  There is no direct dependency on YAML.
 
  The comments that appear in the first row in Excel are based upon the
 use
  of the ?comment function, which adds a 'comment' attribute to the
 columns
  of the data frame. If that attribute is present on one or more columns,
 an
  Excel comment will be created for the columns that have it.
 
  There is an example of this in ?WriteXLS:
 
 # Example using comment()
 # Commented cells with have a small red triangle in the
 # upper right hand corner of the cell. Click on the cell
 # or place the cursor over the cell to see the pop-up
 # containing the comment text.
 # Create an XLSX (Excel 2007) file
 # Adjust the column widths
 # Bold the header row
 comment(iris$Sepal.Length) - Length of the sepals (cm)
 comment(iris$Sepal.Width) - Width of the sepals (cm)
 comment(iris$Petal.Length) - Length of the petals (cm)
 comment(iris$Petal.Width) - Width of the petals (cm)
 comment(iris$Species) - Species of the flowers
 WriteXLS(iris, iriscomments.xlsx, AdjWidth = TRUE, BoldHeaderRow
 =
  TRUE)
 
 
  The 'comment' attribute is not seen when printing the data frame, but
 can
  be seen when using ?str to print the structure

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-24 Thread Orvalho Augusto
Hello!

None can imagine how this package is helpful for me. I might have
understood wrong... is it correct that WriteXLS doesn't no more require
Perl?

It is because I got this on my machine:
 WriteXLS(iris, iriscomments.xlsx, AdjWidth = TRUE, BoldHeaderRow
= TRUE)
Can't locate Archive/Zip.pm in @INC (@INC contains:
/usr/local/lib/R/site-library/WriteXLS/Perl /etc/perl
/usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14
/usr/local/lib/site_perl .) at
/usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX/Workbook.pm
line 25.
BEGIN failed--compilation aborted at
/usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX/Workbook.pm
line 25.
Compilation failed in require at
/usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX.pm line 18.
BEGIN failed--compilation aborted at
/usr/local/lib/R/site-library/WriteXLS/Perl/Excel/Writer/XLSX.pm line 18.
Compilation failed in require at
/usr/local/lib/R/site-library/WriteXLS/Perl/WriteXLSX.pl line 35.
BEGIN failed--compilation aborted at
/usr/local/lib/R/site-library/WriteXLS/Perl/WriteXLSX.pl line 35.
The Perl script 'WriteXLSX.pl' failed to run successfully.

Thank you
Caveman



On Wed, Jul 24, 2013 at 2:27 PM, Marc Schwartz marc_schwa...@me.com wrote:

 On Jul 23, 2013, at 5:40 PM, cognizio ge...@uyleman.com wrote:

  Great summary! It works great without the heavy PERL library. I am
 running
  the YAML package I thought I needed to support WRITEXLS. Do I need it or
 is
  YAML not a dependency?
 
  Other question is on your last point: 'WRITEXLS COMMENT:' now shows up
  across the first row of the data output in the XLS. How do I modify these
  values?
 
  Thx!
 
  Cog


 Hi,

 There is no direct dependency on YAML.

 The comments that appear in the first row in Excel are based upon the use
 of the ?comment function, which adds a 'comment' attribute to the columns
 of the data frame. If that attribute is present on one or more columns, an
 Excel comment will be created for the columns that have it.

 There is an example of this in ?WriteXLS:

 # Example using comment()
 # Commented cells with have a small red triangle in the
 # upper right hand corner of the cell. Click on the cell
 # or place the cursor over the cell to see the pop-up
 # containing the comment text.
 # Create an XLSX (Excel 2007) file
 # Adjust the column widths
 # Bold the header row
 comment(iris$Sepal.Length) - Length of the sepals (cm)
 comment(iris$Sepal.Width) - Width of the sepals (cm)
 comment(iris$Petal.Length) - Length of the petals (cm)
 comment(iris$Petal.Width) - Width of the petals (cm)
 comment(iris$Species) - Species of the flowers
 WriteXLS(iris, iriscomments.xlsx, AdjWidth = TRUE, BoldHeaderRow =
 TRUE)


 The 'comment' attribute is not seen when printing the data frame, but can
 be seen when using ?str to print the structure of the data frame:

  str(iris)
 'data.frame':   150 obs. of  5 variables:
  $ Sepal.Length: atomic  5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
   ..- attr(*, comment)= chr Length of the sepals (cm)
  $ Sepal.Width : atomic  3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
   ..- attr(*, comment)= chr Width of the sepals (cm)
  $ Petal.Length: atomic  1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
   ..- attr(*, comment)= chr Length of the petals (cm)
  $ Petal.Width : atomic  0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
   ..- attr(*, comment)= chr Width of the petals (cm)
  $ Species : Factor w/ 3 levels setosa,versicolor,..: 1 1 1 1 1 1
 1 1 1 1 ...
   ..- attr(*, comment)= chr Species of the flowers



 Regards,

 Marc Schwartz

 __
 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] fail to install shiny package in R 3.0.1 on Ubuntu

2013-07-22 Thread Orvalho Augusto
Dear Yu

Some of the packages required by shiny were installed for version 2
according to the output provided. So you must at least run this as
superuser on R session:
update.packages()

And answer accordiling.

Then you may try to install shiny.
Caveman
On Jul 22, 2013 8:03 PM, yu ge geyu...@gmail.com wrote:

 Hello there,


 I have been used shiny package on Windows without any problem. Recently I
 switched to Linux OS(Ubuntu 12.04), and installed the latest R version
 3.0.1. But I couldn't install shiny for some reasons. Here are the error
 message:

 ** preparing package for lazy loading
 Error : package ‘codetools’ was built before R 3.0.0: please re-install it
 Error : unable to load R code in package ‘Rcpp’
 ERROR: lazy loading failed for package ‘Rcpp’
 * removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0/Rcpp’
 ERROR: dependency ‘Rcpp’ is not available for package ‘httpuv’
 * removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0/httpuv’
 ERROR: dependency ‘httpuv’ is not available for package ‘shiny’
 * removing ‘/home/alex/R/x86_64-pc-linux-gnu-library/3.0/shiny’

 The downloaded source packages are in
 ‘/tmp/RtmpA7KumO/downloaded_packages’
 Warning messages:
 1: In install.packages(shiny) :
   installation of package ‘Rcpp’ had non-zero exit status
 2: In install.packages(shiny) :
   installation of package ‘httpuv’ had non-zero exit status
 3: In install.packages(shiny) :
   installation of package ‘shiny’ had non-zero exit status


 I am newbee for Linux OS. Do I need to install an early R version(older
 than 3.0.0)? Any suggestions will be appreciated. Thanks

 [[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.



[[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] Problem reading dates from Excel

2013-02-08 Thread Orvalho Augusto
I do not promise much. But try to use XLConnect package. It requires rJava
package which requires java on your system.

Good luck
Orvalho

On Fri, Feb 8, 2013 at 8:55 PM, Edwin Isensee edwin.isen...@gmail.comwrote:

 I'm using the read.xls function from gdata package to read one Excel file,
 like the example below:

 library(gdata)
 my_file - '/Users/Desktop/Project.xlsx'
 valores - read.xls(my_file)

 The problem is: one of the columns at the Excel file holds date information
 like 1-Jan-13, 5-Jan-13, 25-Jan-13. At Excel these information are treated
 as dates. When I read the file into a dataframe the corresponding data
 frame column holds numeric information like 41275, 41279, 41299. How can I
 convert these numeric information into the original date information?

 Thanks,
 Edwin

 [[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.


[[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] Read.dta and Write.dta Binary Data Error

2013-01-16 Thread Orvalho Augusto
We have the same problem. And we reported as bug:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15166

Hope someone can help

Orvalho

On Wed, Jan 16, 2013 at 8:05 PM, voldermatt matt.pece...@gmail.com wrote:

 Thanks in advance.

 I pass data sets between R and Stata and think dta files would be the best
 files for this. To do this I can use package foreign or package memisc. I
 mostly use foreign, although have used memisc and this problem mostly
 didn't
 happen, but created errors at other times.

 I have a csv data set (and created a test case) with with at least one
 column completely missing.  This eventually creates the error. My list of
 commands are:

 data - read.csv(file, colClasses = character)
 write.dta(data, newFile)
 read.dta(newFile)
 Error in read.dta(newFile) :
   a binary read error occurred

 The colClasses specificiation is important. This causes the error. Stata 10
 and Stata 11 can read the file. Stata 12 is completely lost looking at the
 dataset. I know this is an R forum, but the data set acts very strangely in
 Stata so I will continue. For my larger data set if I drop one of my
 variables, all variables that are all missing are dropped. Either there is
 an issue with how the data sets are being saved/stored, or I am doing
 something incorrectly by specifying the character option in read.csv.

 I run R version 2.15.1.

 Matt




 --
 View this message in context:
 http://r.789695.n4.nabble.com/Read-dta-and-Write-dta-Binary-Data-Error-tp4655754.html
 Sent from the R help mailing list archive at Nabble.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.


[[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] Pattern names matching

2011-08-20 Thread Orvalho Augusto
Dear R magic guys.. I have two tables (actually will be dataframes), both
with names to be matched.

The names on the first dataframe are from a study with antenatal visits on
some health centers here. It happens that we need the delivery info. And
half and some thing else of the women decided to delivery some where else
our health units. We managed to get the names from some other places but now
we have to match our 4000 original names with over 2 other names.

To make thing more bitter some names have badly written. So I need some
algorithm like Levenstein or sondex or phonix or something better already on
R. Can you help me?

Orvalho

[[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] Pattern names matching

2011-08-20 Thread Orvalho Augusto
Thank you.

Orvalho

On Sat, Aug 20, 2011 at 6:02 PM, David Winsemius dwinsem...@comcast.netwrote:


 On Aug 20, 2011, at 11:25 AM, Doran, Harold wrote:

  See the stringMatch function in the MiscPsycho package for an
 implementation of Levenshtein


 The agrep function in base R also returns a Levenshtein distance.

 --
 David.

  __**__
 From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On
 Behalf Of Orvalho Augusto [orvaq...@gmail.com]
 Sent: Saturday, August 20, 2011 11:08 AM
 To: r-help@r-project.org
 Subject: [R] Pattern names matching

 Dear R magic guys.. I have two tables (actually will be dataframes), both
 with names to be matched.

 The names on the first dataframe are from a study with antenatal visits on
 some health centers here. It happens that we need the delivery info. And
 half and some thing else of the women decided to delivery some where else
 our health units. We managed to get the names from some other places but
 now
 we have to match our 4000 original names with over 2 other names.

 To make thing more bitter some names have badly written. So I need some
 algorithm like Levenstein or sondex or phonix or something better already
 on
 R. Can you help me?

 Orvalho


 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] Running R from windows command prompt

2011-06-29 Thread Orvalho Augusto
If you want to have R available under command prompt you need to add
the R executable to the PATH environmental variable doing this (On
Windows XP and it is similar on Vista or 7):
start right click on My Computer  Choose properties  Advanced 
Envonment variables  Under system variables choose Path and click
EDIT  on variable value at the end of it add ;C:\Program
Files\R\R-2.13.0\bin

Click OK. And you are done.

The C:\Program Files\R\R-2.13.0\bin is the place you have the R
executables which you can find from explorer.

After that your can call R from command prompt like
R CMD BATCH e.g

Good luck
Caveman


On 6/29/11, Michael Sumner mdsum...@gmail.com wrote:
 On Wed, Jun 29, 2011 at 1:51 AM, Robert Baer rb...@atsu.edu wrote:
 Subject: Re: [R] Running R from windows command prompt

 snip
 ---
 Actually, you can 'cut and paste' from at Windows Cmd prompt.  It is done
 by
 clicking the
 C: icon in the upper left of the command window, choosing edit, and 'copy'
 or 'paste'
 as desired.


 Or shortcut to the Edit menu by right-click in the window.

 It is copying out that is weirdest, and worth knowing I think:
 Edit/Mark, then select the text and press Enter to copy it to the
 clipboard.

 Cheers, Mike.

 Rob

 HTH
 _

 Arun Kumar Saha, FRM
 QUANTITATIVE RISK AND HEDGE CONSULTING SPECIALIST
 Visit me at: http://in.linkedin.com/in/ArunFRM

 __
 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.




 --
 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.


__
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] Access R functions from web

2011-06-26 Thread Orvalho Augusto
Thanks everyone!

Now it became difficult to decide. I will give feedback soon.

Caveman


On Sat, Jun 25, 2011 at 9:59 PM, Tobias Verbeke 
tobias.verb...@openanalytics.eu wrote:

 Hi Caveman,


 On 06/25/2011 11:18 AM, Orvalho Augusto wrote:

  I need a way to send R objects and call R functions from web. Is there any
 project close or similar to that?

 I want to be able to send an HTTP rquest from an existing application with
 some data. And obtain a plot from R.


 This is one of the typical integration scenarios
 the R Service Bus is able to cope with.

 http://www.openanalytics.eu/r-**service-bushttp://www.openanalytics.eu/r-service-bus

 The REST interface is documented here

 http://rsb.doc.openanalytics.**eu/ http://rsb.doc.openanalytics.eu/
 http://rsb.doc.openanalytics.**eu/wsdocs/index.htmlhttp://rsb.doc.openanalytics.eu/wsdocs/index.html

 Best,
 Tobias


[[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] RJDBC and multiple classpaths

2011-06-26 Thread Orvalho Augusto
Corect me if this is not the right place to post this.

I have a mdbdriver.jar (to access an MSAccess file) under Linux. I bought
the license from http://www.csv-jdbc.com/ guys. The driver work fine when
tested with DBVisualizer or another JDBC thing.

The problem is that driver needs 3 other more jar files to work. Under R I
have tried this and does not work:
 library(RJDBC)
Loading required package: DBI
Loading required package: rJava
 .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/log4j.jar)
 .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_lang.jar)
 .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_logging.jar)

 drv - JDBC(jstels.jdbc.mdb.MDBDriver,
/opt/DbVisualizer-7.1.1/jdbc/mdb/mdbdriver.jar)
Error in .jfindClass(as.character(driverClass)[1]) :
  java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator

As you see I have added the log4j with .jaddClassPath. What is wrong?

Caveman

[[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] RJDBC and multiple classpaths

2011-06-26 Thread Orvalho Augusto
My ignorance! I managed to connect doing:

library(RJDBC)
cp - c(
/opt/DbVisualizer-7.1.1/jdbc/mdb/log4j.jar,
/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_lang.jar,
/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_logging.jar
)

.jinit(classpath=cp)

drv - JDBC(jstels.jdbc.mdb.MDBDriver,
/opt/DbVisualizer-7.1.1/jdbc/mdb/mdbdriver.jar)
con - dbConnect(drv,
jdbc:jstels:mdb:/mnt/disco/data/fhi/roads/ROADSII.mdb)

If there better ways please advice me. Thanks!

Caveman



On Sun, Jun 26, 2011 at 3:29 PM, Orvalho Augusto orvaq...@gmail.com wrote:

 Corect me if this is not the right place to post this.

 I have a mdbdriver.jar (to access an MSAccess file) under Linux. I bought
 the license from http://www.csv-jdbc.com/ guys. The driver work fine when
 tested with DBVisualizer or another JDBC thing.

 The problem is that driver needs 3 other more jar files to work. Under R I
 have tried this and does not work:
  library(RJDBC)
 Loading required package: DBI
 Loading required package: rJava
  .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/log4j.jar)
  .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_lang.jar)
  .jaddClassPath(/opt/DbVisualizer-7.1.1/jdbc/mdb/commons_logging.jar)
 
  drv - JDBC(jstels.jdbc.mdb.MDBDriver,
 /opt/DbVisualizer-7.1.1/jdbc/mdb/mdbdriver.jar)
 Error in .jfindClass(as.character(driverClass)[1]) :
   java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator

 As you see I have added the log4j with .jaddClassPath. What is wrong?

 Caveman



[[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] Access R functions from web

2011-06-25 Thread Orvalho Augusto
I need a way to send R objects and call R functions from web. Is there any
project close or similar to that?

I want to be able to send an HTTP rquest from an existing application with
some data. And obtain a plot from R.

Thanks in advance
Caveman

[[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] R-Size Limit (Confused)

2011-05-27 Thread Orvalho Augusto
I do not know what problem might be. But I recommend to go back to the excel
file, import it into MS Access. Then make an ODBC connection to the access
file. From which you will connect from R using RODBC.

Caveman

On Thu, May 26, 2011 at 11:59 PM, David Winsemius dwinsem...@comcast.netwrote:


 On May 26, 2011, at 5:15 PM, Struckmeier, Nathanael wrote:

  Hello,

 I've been banging my head against my monitor for some time now trying to
 import data into R. The problem is either in my use of syntax, my data
 format, or my memory. I have described what I have tried below. Please
 help.

 =My GOAL==

  import a 4 column, 8,000 row table into R including headers.


 =WHAT I'VE ATTEMPTED==

 Original data was in Excel format.

 Converted data to both a .txt and .csv (to see which worked better)

 Imported data into R via commands as object demand (see below)

 Please excuse the long file path.

 demand=read.delim(C:\\Documents and Settings\\E066582\\My
 Documents\\R\\R-2.13.0\\bin\\demand.txt, header=T)



 demand=read.csv((C:\\Documents and Settings\\E066582\\My
 Documents\\R\\R-2.13.0\\bin\\demand.csv)

 ==PROBLEMS==

 In both cases, about half to three fourths of my data shows up as

 object demand with about 4000 lines. My headers also fail to appear.
 When my data is imported into R and I type the object name to bring it
 up I receive a memory usage error.

 ==SOLUTIONS

 I've gone in and cleaned up my data, making sure there are no (') or (#)
 but it could still a formatting issue

 My computer has 1.9GB RAM.  I have looked but I can't figure out how to
 increase R memory usage.

 Any ideas would be appreciated. If someone needs more information to
 help me I'll supply it.


 The information needed to address this is a public path to a place where
 one of those files resides.

 The problem is almost certainly not related to memory size. That is a tiny
 file. You could also cut and paste the first 20 lines into a message. Maybe
 there is something in the contents of the header that is the problem.

 --

 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.


[[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] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or
you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman


On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote:

 Dear all,
 Installing rJava fails. The message was listed below. I wonder why cpp flag
 could not be detected, although I had installed. Thanks!!!
 -Jiacheng

 R CMD INSTALL rJava_0.9-0.tar.gz
 * installing to library
 ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -std=gnu99 accepts -g... yes
 checking for gcc -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -std=gnu99 -E
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/wait.h that is POSIX.1 compatible... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking sys/time.h usability... yes
 checking sys/time.h presence... yes
 checking for sys/time.h... yes
 checking for unistd.h... (cached) yes
 checking for an ANSI C-conforming const... yes
 checking whether time.h and sys/time.h may both be included... yes
 configure: checking whether gcc -std=gnu99 supports static inline...
 yes
 checking whether setjmp.h is POSIX.1 compatible... yes
 checking whether sigsetjmp is declared... yes
 checking whether siglongjmp is declared... yes
 checking Java support in R... present:
 interpreter : '/usr/bin/java'
 archiver: '/usr/bin/jar'
 compiler: '/usr/bin/javac'
 header prep.: '/usr/bin/javah'
 cpp flags   : ''
 java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
 -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 configure: error: One or more Java configuration variables are not set.
 Make sure R is configured with full Java support (including JDK). Run
 R CMD javareconf
 as root to add Java support to R.

 If you don't have root privileges, run
 R CMD javareconf -e
 to set all Java-related variables and then install rJava.

 ERROR: configuration failed for package ‘rJava’
 * removing ‘/R-2.12.0/library/rJava’

[[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.



[[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] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
It seems that you are not alone with that error  (
http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing).

Defining only JAVA_HOME he would find everything else.

Backup your /etc/R before do this.

Running the R CMD javareconf is to place variables like this in
/etc/R/Makeconf (hope the experts corect me)
JAR = /usr/bin/jar
JAVA = /usr/bin/java
JAVAC = /usr/bin/javac
JAVAH = /usr/bin/javah
JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.24/jre
JAVA_LD_LIBRARY_PATH =
$(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
JAVA_LIBS = -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386
-L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib
-ljvm
JAVA_CPPFLAGS = -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux

Add it manually. Pay attention the amd64 versus my i386. Place on variable
sections

Edit /etc/R/ldpahs place before if test -n...
: ${JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre}
:
${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/i386/server:${JAVA_HOME}/lib/i386:${JAVA_HOME}/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib}

Again correct with your paths.

And try to install rJava.

Caveman


On Fri, Mar 18, 2011 at 7:30 PM, jcheng liu jcheng@gmail.com wrote:

  Dear Orvalho Augusto,
 Thank so much for you response!
 We had run R CMD javareconf -e, and even R CMD javareconf in administrator.

 Actually, we had install the JDK. And in the output, only the item of JNI
 cpp flages could not be detected(I listed output below). What does the item
 mean? What need we install?

 Thanks,
 Jiacheng

 R CMD javareconf -e

 Java interpreter : /usr/bin/java
 Java version : 1.6.0_24
 Java home path   : /usr/java/jre1.6.0_24
 Java compiler: /usr/bin/javac
 Java headers gen.: /usr/bin/javah
 Java archive tool: /usr/bin/jar
 Java library path:
 $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
 JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
 -L/lib64 -L/lib -L/usr/lib -ljvm
 JNI cpp flags:

 The following Java variables have been exported:
 JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
 Runnig: /bin/tcsh



 On 3/18/2011 12:53 PM, Orvalho Augusto wrote:

 Run
 R CMD javareconf -e

 as the being suggest by the output. That will try to guess where is Java.
 Or you can install the JDK_HOME and JAVA_HOME variables.

 Good luck.
 Caveman


  On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu jcheng@gmail.com wrote:

 Dear all,
 Installing rJava fails. The message was listed below. I wonder why cpp
 flag
 could not be detected, although I had installed. Thanks!!!
 -Jiacheng

 R CMD INSTALL rJava_0.9-0.tar.gz
 * installing to library
 ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -std=gnu99 accepts -g... yes
 checking for gcc -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -std=gnu99 -E
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/wait.h that is POSIX.1 compatible... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking sys/time.h usability... yes
 checking sys/time.h presence... yes
 checking for sys/time.h... yes
 checking for unistd.h... (cached) yes
 checking for an ANSI C-conforming const... yes
 checking whether time.h and sys/time.h may both be included... yes
 configure: checking whether gcc -std=gnu99 supports static inline...
 yes
 checking whether setjmp.h is POSIX.1 compatible... yes
 checking whether sigsetjmp is declared... yes
 checking whether siglongjmp is declared... yes
 checking Java support in R... present:
 interpreter : '/usr/bin/java'
 archiver: '/usr/bin/jar'
 compiler: '/usr/bin/javac'
 header prep.: '/usr/bin/javah'
 cpp flags   : ''
 java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
 -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 configure: error: One or more Java configuration variables are not set.
 Make

[R] Table multiple answers variables

2011-03-15 Thread Orvalho Augusto
I have a dataset like this:

   q25_1 q25_2 q25_3 q25_4 q25_5 q25_6 q25_7 q25_8 q25_9 q25_10 q25_11 q25_12
1  2 2 1 1 2 1 2 1 1  2  1  3
2  2 2 2 1 2 1 2 1 1  2  1  2
3  2 1 1 1 2 1 2 1 2  2  1  2
4  2 2 1 1 2 2 2 1 1  1  2  2
5  2 2 1 1 2 3 2 1 2  2  2  2
6  2 2 1 1 2 2 2 1 1  1  2  2
7  2 2 1 1 2 3 2 1 2  2  3  2
8  2 2 1 1 1 1 2 1 1  1  2  2
9  2 2 1 1 2 2 2 1 2  2  2  2
10 2 2 1 1 2 2 2 1 2  1  2  2

where those q25_ variables are answers (coded 1 for Yes 2 for No). Now I
need a way to table counting the ones foreach variables like

varcountpercentage
q25_1 20  80
q25_2 34  85
...

Is it possible ir R?

For who used stata might use mrtab.

Thank you
Orvalho

[[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] Table multiple answers variables

2011-03-15 Thread Orvalho Augusto
This is!

Thank you everyone.

Caveman


On Tue, Mar 15, 2011 at 4:24 PM, Dimitris Rizopoulos 
d.rizopou...@erasmusmc.nl wrote:

 try the following:

 DF - as.data.frame(matrix(sample(2, 120, TRUE), 10, 12))

 Results - data.frame(
var = names(DF),
count = colSums(DF == 1),
percentage = colMeans(DF == 1)
 )


 I hope it helps.

 Best,
 Dimitris



 On 3/15/2011 3:13 PM, Orvalho Augusto wrote:

 I have a dataset like this:

q25_1 q25_2 q25_3 q25_4 q25_5 q25_6 q25_7 q25_8 q25_9 q25_10 q25_11
 q25_12
 1  2 2 1 1 2 1 2 1 1  2  1
  3
 2  2 2 2 1 2 1 2 1 1  2  1
  2
 3  2 1 1 1 2 1 2 1 2  2  1
  2
 4  2 2 1 1 2 2 2 1 1  1  2
  2
 5  2 2 1 1 2 3 2 1 2  2  2
  2
 6  2 2 1 1 2 2 2 1 1  1  2
  2
 7  2 2 1 1 2 3 2 1 2  2  3
  2
 8  2 2 1 1 1 1 2 1 1  1  2
  2
 9  2 2 1 1 2 2 2 1 2  2  2
  2
 10 2 2 1 1 2 2 2 1 2  1  2
  2

 where those q25_ variables are answers (coded 1 for Yes 2 for No). Now I
 need a way to table counting the ones foreach variables like

 varcountpercentage
 q25_1 20  80
 q25_2 34  85
 ...

 Is it possible ir R?

 For who used stata might use mrtab.

 Thank you
 Orvalho

[[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.


 --
 Dimitris Rizopoulos
 Assistant Professor
 Department of Biostatistics
 Erasmus University Medical Center

 Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
 Tel: %2B31%2F%280%2910%2F7043478+31/(0)10/7043478
 Fax: %2B31%2F%280%2910%2F7043014+31/(0)10/7043014
 Web: http://www.erasmusmc.nl/biostatistiek/


[[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] Compiling R-2.12.1 with gcc 3.4.6 on Sun Sparc Solaris 10

2011-02-25 Thread Orvalho Augusto
I do not know exactly about Sun Sparc but I use some *nix and readline is a
library available and is used by the operating system to recall lines of
previously typed input. So I suggest to search readline package for Sun
Sparc.

Good luck
Caveman




On Sat, Feb 26, 2011 at 2:18 AM, ted.h.f...@kp.org wrote:

 Dear R-HELP,

 We are compiling R-2.12.1 for 64 bits onto a Sun Sparc machine below:
 SunOS 5.10 Generic_142900-13 sun4u sparc SUNW,Netra-T12

 The source was compiled successfully with gcc version 3.4.6 by using the
 default configuration and has produced R-2.12.1 in 32 bits.

 Compiling R-2.12.1 for the 64 bits by configuring the config.site file as
 follow:
 CC=gcc -m64
 F77=f77 -m64
 CXX=g++ -m64
 FC=$F77
 CPPFLAGS='-I/usr/sfw/include'
 LDFLAGS='-L/usr/lib/64 -L/usr/sfw/lib/64 -L/usr/sfw/lib/sparcv9
 -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/sparcv9'


 has produced following messages:
 configure: error: --with-readline=yes (default) and headers/libs are not
 available
 See attached configure.out.txt file and config.site file .


 Appreciate your help to identify the missing header/libs when compiling
 R-2.12.1 for 64 bits on the above platform ?

 The R-2.11.1 compiled version from Sunfreeware download is verified to be
 32 bits.
  .Machine$sizeof.pointer
 [1] 4
 This should return 8 for 64 bits.

 Would  there be a compiled version of R-2.12.1 64 bits available for
 download ?

 Thanks
 Ted Fong

 NOTICE TO RECIPIENT:  If you are not the intended recipient of this
 e-mail, you are prohibited from sharing, copying, or otherwise using or
 disclosing its contents.  If you have received this e-mail in error,
 please notify the sender immediately by reply e-mail and permanently
 delete this e-mail and any attachments without reading, forwarding or
 saving them.  Thank you.

 __
 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] rjava does not install

2011-02-14 Thread Orvalho Augusto
Sorry for this delay. I have installed rjava on Fedora, CentOS and Debians.

The secret is to install java and configure de java variables. The easiest
way for R is:
R CMD javareconf

It will detect your java envoriment and preconfigure R for you.

Then  run: R CMD INSTALL rJava etc as you did.

Caveman


On Tue, Feb 8, 2011 at 9:05 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote:

 This isn't the right place (rJava has its own support lists), but

 - that is not the Java package installed on any version of Fedora I have
 seen, and you might want to try the native openjdk version.

 - the JAVA_HOME used by the build is not what you show, as it is looking in
 /opt/jre1.6.0_22/include (and needs to look in the JDK).

 I have no idea what about your setup caused the discrepancy: please seek
 help from your local Linux support (or use rJava's support lists).


 On Mon, 7 Feb 2011, servet cizmeli wrote:

  I am on a fedora server on which I am not root privileges. I am trying to
 locally install rJava... Here are my steps :

 $uname -a
 Linux 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64
 x86_64 x86_64 GNU/Linux

 $ java -version
 java version 1.6.0_22
 Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
 Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

 $ echo $JAVA_HOME
 /opt/jdk1.6.0_22/

 $ R CMD javareconf -e
 Java interpreter : /opt/jdk1.6.0_22//jre/bin/java
 Java version : 1.6.0_22
 Java home path : /opt/jdk1.6.0_22/
 Java compiler : /opt/jdk1.6.0_22//bin/javac
 Java headers gen.: /opt/jdk1.6.0_22//bin/javah
 Java archive tool: /opt/jdk1.6.0_22//bin/jar
 Java library path:
 $(JAVA_HOME)jre/lib/amd64/server:$(JAVA_HOME)jre/lib/amd64:$(JAVA_HOME)jre/../lib/amd64::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
 JNI linker flags : -L$(JAVA_HOME)jre/lib/amd64/server
 -L$(JAVA_HOME)jre/lib/amd64 -L$(JAVA_HOME)jre/../lib/amd64 -L
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm
 JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

 The following Java variables have been exported:
 JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS
 JAVA_LD_LIBRARY_PATH

 And the installation halts with the following error (please see below for
 the details):
 rJava.h:19:17: error: jni.h: No such file or directory

 I would appreciate very much your kindly help
 Servet



 install.packages(rJava,dep=T)
 Installing package(s) into
 ‘/home/acizmeli/R/x86_64-redhat-linux-gnu-library/2.12’
 (as ‘lib’ is unspecified)
 --- Please select a CRAN mirror for use in this session ---
 Loading Tcl/Tk interface ... done
 trying URL 'http://cran.skazkaforyou.com/src/contrib/rJava_0.8-8.tar.gz'
 Content type 'application/x-gzip' length 522057 bytes (509 Kb)
 opened URL
 ==
 downloaded 509 Kb

 * installing *source* package ‘rJava’ ...
 checking for gcc... gcc -m64 -std=gnu99
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -m64 -std=gnu99 accepts -g... yes
 checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/wait.h that is POSIX.1 compatible... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking sys/time.h usability... yes
 checking sys/time.h presence... yes
 checking for sys/time.h... yes
 checking for unistd.h... (cached) yes
 checking for an ANSI C-conforming const... yes
 checking whether time.h and sys/time.h may both be included... yes
 configure: checking whether gcc -m64 -std=gnu99 supports static inline...
 yes
 checking whether setjmp.h is POSIX.1 compatible... yes
 checking whether sigsetjmp is declared... yes
 checking whether siglongjmp is declared... yes
 checking Java support in R... present:
 interpreter : '/opt/jdk1.6.0_22//jre/bin/java'
 archiver : '/opt/jdk1.6.0_22//bin/jar'
 compiler : '/opt/jdk1.6.0_22//bin/javac'
 header prep.: '/opt/jdk1.6.0_22//bin/javah'
 cpp flags : '-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux'
 java libs : '-L$(JAVA_HOME)jre/lib/amd64/server
 -L$(JAVA_HOME)jre/lib/amd64 -L$(JAVA_HOME)jre/../lib/amd64 -L
 -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
 -ljvm'
 checking whether JNI programs can be compiled... yes
 checking JNI data types... ok
 checking 

Re: [R] Parsing a XML file

2010-08-27 Thread Orvalho Augusto
Ok.

Pardon me. Its is not a bug. My XML is malformed. The program that generates
writes things like:
agecat5yr/agecat

Which make the XML unsable.

Sorry everyone

Caveman


On Wed, Aug 25, 2010 at 5:31 AM, Duncan Temple Lang dun...@wald.ucdavis.edu
 wrote:


 xmlDoc() is not the function to use to parse a file.

 Use

   doc = xmlParse(Malaria_Grave.xml)


 xmlDoc() is for programmatically creating a new XML within R.
 It could be more robust to being called with a string, but
 the key thing here is that it is not the appropriate function for what
 you want.


 Also, if there had been a problem with the parsing, you'd need to give
 me/us the offending XML  file so that we could have a chance of reproducing
 the problem.

   D.


 On 8/24/10 2:35 PM, Orvalho Augusto wrote:
  I have one XML file with 30MB that I need to read the data.
 
  I try this;
  library(XML)
  doc - xmlDoc(Malaria_Grave.xml)
 
  And R answers like this
   *** caught segfault ***
  address 0x5, cause 'memory not mapped'
 
  Traceback:
   1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
   2: xmlDoc(Malaria_Grave.xml)
 
  Possible actions:
  1: abort (with core dump, if enabled)
  2: normal R exit
  3: exit R without saving workspace
  4: exit R saving workspace
 
 
  Or I try this:
  doc - xmlTreeParse(Malaria_Grave.xml)
 
  I get this
  xmlParseEntityRef: no name
  xmlParseEntityRef: no name
  Error: 1: xmlParseEntityRef: no name
  2: xmlParseEntityRef: no name
 
  Please guys help this simple mortal!
  Caveman
 
[[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.


[[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] Parsing a XML file

2010-08-24 Thread Orvalho Augusto
I have one XML file with 30MB that I need to read the data.

I try this;
library(XML)
doc - xmlDoc(Malaria_Grave.xml)

And R answers like this
 *** caught segfault ***
address 0x5, cause 'memory not mapped'

Traceback:
 1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
 2: xmlDoc(Malaria_Grave.xml)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace


Or I try this:
doc - xmlTreeParse(Malaria_Grave.xml)

I get this
xmlParseEntityRef: no name
xmlParseEntityRef: no name
Error: 1: xmlParseEntityRef: no name
2: xmlParseEntityRef: no name

Please guys help this simple mortal!
Caveman

[[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] Parsing a XML file

2010-08-24 Thread Orvalho Augusto
It seems to be a bug on the XML package.

This is what I run (and it is not the only file):
 library(XML)
 doc - xmlDoc(Malaria_Grave.xml)

 *** caught segfault ***
address 0x9, cause 'memory not mapped'

Traceback:
 1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
 2: xmlDoc(Malaria_Grave.xml)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 1
aborting ...
Segmentation fault

##=
 sessionInfo()
R version 2.11.1 (2010-05-31)
i686-pc-linux-gnu

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] XML_3.1-1


##=

Thanks
Caveman


On Wed, Aug 25, 2010 at 12:02 AM, Gavin Simpson gavin.simp...@ucl.ac.ukwrote:

 On Tue, 2010-08-24 at 23:35 +0200, Orvalho Augusto wrote:
  I have one XML file with 30MB that I need to read the data.
 
  I try this;
  library(XML)
  doc - xmlDoc(Malaria_Grave.xml)
 
  And R answers like this
   *** caught segfault ***
  address 0x5, cause 'memory not mapped'

 This is most likely a bug in your version (unstated) of the XML package.
 But it may be a problem with the file, though XML shouldn't crash R.
 Make sure you are using the latest version of the XML package and R is
 up-to-date, then retry your code in a new R session. If it still
 segfaults, you need to file a bug report with the maintainer: Duncan
 Temple Lang, and include all the relevant details such as output from

 sessionInfo()

 The .xml file you are trying to read and the code required to reproduce
 the segfault.

 HTH

 G

  Traceback:
   1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
   2: xmlDoc(Malaria_Grave.xml)
 
  Possible actions:
  1: abort (with core dump, if enabled)
  2: normal R exit
  3: exit R without saving workspace
  4: exit R saving workspace
 
 
  Or I try this:
  doc - xmlTreeParse(Malaria_Grave.xml)
 
  I get this
  xmlParseEntityRef: no name
  xmlParseEntityRef: no name
  Error: 1: xmlParseEntityRef: no name
  2: xmlParseEntityRef: no name
 
  Please guys help this simple mortal!
  Caveman
 
[[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.

 --
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
  Dr. Gavin Simpson [t] +44 (0)20 7679 0522
  ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
  Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
  Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
  UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



[[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] Parsing a XML file

2010-08-24 Thread Orvalho Augusto
My system is an Ubuntu 9.10 32bit:
#uname -a
Linux cavemanpc 2.6.31-22-generic #63-Ubuntu SMP Wed Aug 18 22:54:26 UTC
2010 i686 GNU/Linux

# free -m
 total   used   free sharedbuffers cached
Mem:  3000   1847   1152  0120961
-/+ buffers/cache:766   2234
Swap: 4769  0   4769

My Ubuntu XML related packages:
r...@cavemanpc:~# dpkg -l | grep -i libxml | awk '{ print $2}'
libxml++2.6-2
libxml++2.6-dev
libxml-commons-external-java
libxml-commons-resolver1.1-java
libxml-java-openoffice.org
libxml-parser-perl
libxml-twig-perl
libxml-xpath-perl
libxml2
libxml2-dev
libxml2-utils
libxmlgraphics-commons-java
python-libxml2

Thanks

Caveman



On Wed, Aug 25, 2010 at 12:43 AM, Orvalho Augusto orvaq...@gmail.comwrote:

 It seems to be a bug on the XML package.

 This is what I run (and it is not the only file):
  library(XML)
  doc - xmlDoc(Malaria_Grave.xml)

  *** caught segfault ***
 address 0x9, cause 'memory not mapped'

 Traceback:
  1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
  2: xmlDoc(Malaria_Grave.xml)

 Possible actions:
 1: abort (with core dump, if enabled)
 2: normal R exit
 3: exit R without saving workspace
 4: exit R saving workspace
 Selection: 1
 aborting ...
 Segmentation fault

 ##=
  sessionInfo()
 R version 2.11.1 (2010-05-31)
 i686-pc-linux-gnu

 locale:
  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base

 other attached packages:
 [1] XML_3.1-1
 

 ##=

 Thanks
 Caveman


 On Wed, Aug 25, 2010 at 12:02 AM, Gavin Simpson 
 gavin.simp...@ucl.ac.ukwrote:

 On Tue, 2010-08-24 at 23:35 +0200, Orvalho Augusto wrote:
  I have one XML file with 30MB that I need to read the data.
 
  I try this;
  library(XML)
  doc - xmlDoc(Malaria_Grave.xml)
 
  And R answers like this
   *** caught segfault ***
  address 0x5, cause 'memory not mapped'

 This is most likely a bug in your version (unstated) of the XML package.
 But it may be a problem with the file, though XML shouldn't crash R.
 Make sure you are using the latest version of the XML package and R is
 up-to-date, then retry your code in a new R session. If it still
 segfaults, you need to file a bug report with the maintainer: Duncan
 Temple Lang, and include all the relevant details such as output from

 sessionInfo()

 The .xml file you are trying to read and the code required to reproduce
 the segfault.

 HTH

 G

  Traceback:
   1: .Call(RS_XML_createDocFromNode, node, PACKAGE = XML)
   2: xmlDoc(Malaria_Grave.xml)
 
  Possible actions:
  1: abort (with core dump, if enabled)
  2: normal R exit
  3: exit R without saving workspace
  4: exit R saving workspace
 
 
  Or I try this:
  doc - xmlTreeParse(Malaria_Grave.xml)
 
  I get this
  xmlParseEntityRef: no name
  xmlParseEntityRef: no name
  Error: 1: xmlParseEntityRef: no name
  2: xmlParseEntityRef: no name
 
  Please guys help this simple mortal!
  Caveman
 
[[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.

 --
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
  Dr. Gavin Simpson [t] +44 (0)20 7679 0522
  ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
  Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
  Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
  UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%







[[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] ASCI characters

2010-08-16 Thread Orvalho Augusto
Thank you every one.

Caveman


On Mon, Aug 16, 2010 at 4:00 AM, David Winsemius dwinsem...@comcast.netwrote:

 To improve your further efforts at searching you should take note of the
 fact that it is ASCII, not ASCI.


 On Aug 15, 2010, at 8:50 PM, Orvalho Augusto wrote:

  Thank you!!

 Caveman


 On Mon, Aug 16, 2010 at 2:41 AM, Matt Shotwell shotw...@musc.edu wrote:

  How about:

  rawToChar(as.raw(82))

 [1] R

 -Matt

 On Sun, 2010-08-15 at 19:50 -0400, Orvalho Augusto wrote:

 Hello guys!

 Is there any function that permits me to get an ASCI character from its
 code? Eg. ascifunction(34) would give me '
 or ascifunction(92) gives \

 Thanks
 Caveman

 [[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.


 --
 Matthew S. Shotwell
 Graduate Student
 Division of Biostatistics and Epidemiology
 Medical University of South Carolina



[[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.


[R] ASCI characters

2010-08-15 Thread Orvalho Augusto
Hello guys!

Is there any function that permits me to get an ASCI character from its
code? Eg. ascifunction(34) would give me '
or ascifunction(92) gives \

Thanks
Caveman

[[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] ASCI characters

2010-08-15 Thread Orvalho Augusto
Thank you!!

Caveman


On Mon, Aug 16, 2010 at 2:41 AM, Matt Shotwell shotw...@musc.edu wrote:

 How about:

  rawToChar(as.raw(82))
 [1] R

 -Matt

 On Sun, 2010-08-15 at 19:50 -0400, Orvalho Augusto wrote:
  Hello guys!
 
  Is there any function that permits me to get an ASCI character from its
  code? Eg. ascifunction(34) would give me '
  or ascifunction(92) gives \
 
  Thanks
  Caveman
 
[[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.

 --
 Matthew S. Shotwell
 Graduate Student
 Division of Biostatistics and Epidemiology
 Medical University of South Carolina



[[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] Replacing characters

2010-08-10 Thread Orvalho Augusto
Hello guys! May be I am lazy but

I need to replace a character like \ or ' or to escape them in a character
vector to write a SQL statement.

How can I do that?

Caveman

[[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] help with importing SPSS file

2010-05-31 Thread Orvalho Augusto
I am not sure about this but a sav file contains only one dataset. Meaning
one table only.

That table could be a joining of another tables.

The R read.spss works with that on mind.

Caveman


On Tue, Jun 1, 2010 at 12:41 AM, jinbo...@yahoo.com wrote:

 Hi,

 I have a SPSS .sav file which contains a database of multiple tables, and
 each table contains multiple variables.
 I used read.spss function to load the data

 A-read.spss(datafile.sav,to.data.frame = TRUE)

 I see variable names, but do not know how to retrieve the table (or all the
 variables corresponding to a table).

 -sophia

 __
 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] RODBC-Error-sqlSave

2010-05-16 Thread Orvalho Augusto
Let us see if it is a R issue.

Try this:
Read the CSV on Ms Access directly. It is an importation on MsAccess.

If you succeed we will check R then.

Caveman


On Sun, May 16, 2010 at 11:48 AM, Johan Lassen johanlas...@gmail.com wrote:
 Dear R-community,

 After repeating the sqlSave-command 3 times on a dataframe (of size 13149
 rows * 5 columns) to my MS-Access database I get the following error:

 *Error in sqlSave(channel, eksport_transp_acc_2, transp_acc_scenarier,  :
 unable to append to table ‘transp_acc_scenarier’*
 **
 This means that the first 2 savings are completed, but the third-one
 is somehow not. I have an idea that perhaps it is due to some out-of-memory
 problem. My PC has 2 CPUs, 1.83 G Hz, 0.99 GB RAM.

 Have anyone got some idea of what causes and solves the problem? I have
 tried also with the function *gc()*, but without success.

 Thanks in advance,
 Best regards,
 Johan



 PS:
 I use the following code, where the file *eksport_transp_acc_2_rbind.csv* is
 of size 13149*5:


 *library(RODBC)*
 **
 *eksport_transp_acc_2 -
 read.table(file = results/csv/eksport_transp_acc_2_rbind.csv,
  sep =;, header = T)*
 **
 *sqlSave(channel,eksport_transp_acc_2,
 transp_acc_scenarier,append = T,fast = F,rownames = F)
 *





 --
 Johan Lassen

 In the cities people live in time -
 in the mountains people live in space

        [[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.


Re: [R] help on compile r-2.10.0 on 64 bit window

2010-05-05 Thread Orvalho Augusto
Hello!

Unless you really need 2.10 there is 2.11 and the good news is we have
now 64bit R binary for windows.

Good luck
Caveman

On Thu, May 6, 2010 at 3:53 AM, zach Li zach...@hotmail.com wrote:

 Hi,



 I tried to compile R-2.10.0 src on 64 bit window. After install Rtools and 
 wingw-w64 compiler and put it the first of my PATH variable, but i got the 
 following error when i tried to compile. Anything I missed? thank you.



 x86_64-w64-mingw32-gcc -std=gnu99 -I../include -I. -I../extra -DHAVE_CONFIG_H 
 -D
 R_DLL_BUILD  -O3 -Wall -pedantic  -DR_ARCH='x64' -c malloc.c -o malloc.o
 x86_64-w64-mingw32-windres  -I../include -i dllversion.rc -o dllversion.o
 x86_64-w64-mingw32-gcc -std=gnu99 -shared -s -mwindows -o R.dll R.def 
 console.o
 dataentry.o dynload.o edit.o editor.o embeddedR.o extra.o opt.o pager.o 
 preferen
 ces.o psignal.o rhome.o rt_complete.o rui.o run.o shext.o sys-win32.o 
 system.o d
 os_wglob.o malloc.o ../main/libmain.a ../appl/libappl.a ../nmath/libnmath.a 
 getl
 ine/gl.a ../extra/xdr/libxdr.a ../extra/pcre/libpcre.a 
 ../extra/bzip2/libbz2.a .
 ./extra/intl/libintl.a ../extra/trio/libtrio.a ../extra/tzone/libtz.a 
 ../extra/t
 re/libtre.a ../extra/xz/liblzma.a dllversion.o -L. -lgfortran -lRblas 
 -L../../bi
 n -lRzlib -lRgraphapp -lRiconv -lcomctl32 -lversion
 cp R.dll ../../bin
 x86_64-w64-mingw32-gfortran -O3  -c blas.f -o blas.o
 x86_64-w64-mingw32-gfortran -O3  -c cmplxblas.f -o cmplxblas.o
  Building ../../../bin/Rblas.dll 
 x86_64-w64-mingw32-gcc -std=gnu99 -shared  -o ../../../bin/Rblas.dll blas.o 
 cmpl
 xblas.o ../../gnuwin32/dllversion.o Rblas.def -L../../../bin -lR -lgfortran
 c:/rtools/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.4/../../../../x86_64-w
 64-mingw32/bin/ld.exe: cannot find -lR
 collect2: ld returned 1 exit status
 make[3]: *** [../../../bin/Rblas.dll] Error 1
 make[2]: *** [Rblas] Error 2
 make[1]: *** [rbuild] Error 2
 make: *** [all] Error 2

 _
 Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.

 N:WL:en-US:WM_HMP:042010_1
        [[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.


Re: [R] large dataset

2010-03-27 Thread Orvalho Augusto
I do not know what is the limit for R. But on your problem you may try this:
- Install MySQL server (download somewhere on www.mysql.com)
- From inside MySQL you may import that CSV into a MySQL table
- Then using RMySQL or ROBDC you will choose the Fields to use and
import them to R.

Good luck
Caveman


On Sat, Mar 27, 2010 at 11:19 AM, n.via...@libero.it n.via...@libero.it wrote:
 Hi I have a question,
 as im not able to import a csv file which contains a big dataset(100.000 
 records) someone knows how many records R can handle without giving problems?
 What im facing when i try to import the file is that R generates more than 
 100.000 records and is very slow...
 thanks a lot!!!

 __
 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.




-- 
Databases, Data Analysis and
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and getting a file through https

2010-03-18 Thread Orvalho Augusto
Thank you!

I did not know about this resource.

Caveman


On Thu, Mar 18, 2010 at 6:26 AM, David Winsemius dwinsem...@comcast.net wrote:

 On Mar 18, 2010, at 12:03 AM, Orvalho Augusto wrote:

 Dears!

 I have a system that generates links on a https webserver.

 I have to be logged on with a username and password; Then follow at
 least fife links to get into the link where I can download the file.

 The question is: How can I accomplish that with R?

 RSiteSearch(password https rcurl)

 Leading to:
 http://finzi.psych.upenn.edu/Rhelp10/2009-August/208582.html


 Caveman

 __
 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] R and getting a file through https

2010-03-17 Thread Orvalho Augusto
Dears!

I have a system that generates links on a https webserver.

I have to be logged on with a username and password; Then follow at
least fife links to get into the link where I can download the file.

The question is: How can I accomplish that with R?

Caveman

__
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] Making FTP operations with R

2010-03-08 Thread Orvalho Augusto
Dears I need to make some very basic FTP operations with R.

I need to do a lot of get and issue a respective delete command
too on the same connection.

How can I do that?

Thanks in advance

Caveman

__
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] Labels on a pyramide

2010-02-14 Thread Orvalho Augusto
Jim thanks for your great! I will try to use your source code.

Caveman

Ps:
Reconheco a minha trogolodice e por isso pedi ajuda. Lamento perturbar
a todos por isso.


On Sun, Feb 14, 2010 at 1:05 PM, Jim Lemon j...@bitwrit.com.au wrote:
 On 02/14/2010 01:27 AM, Orvalho Augusto wrote:

 I am using pyramid.plot() from the plotrix package.
 ...
 The problem is (1) I do not want plot agelabels on the center and (2)
 I want plot different labels for each pair of the bars (one label for
 masculine and the other feminine).

 The data represent the 10 most frequent cancer in a group of individuals.


 Bueno troglodita,
 You have discovered a deficiency in pyramid.plot, and for that you get an
 answer to your question and brand new source code!

 source(pyramid.plot.R)

 after loading the plotrix package. Use it quickly, for it will be in the
 next version of plotrix and then everyone (todo el mundo, hombre!) will be
 using it.

 Jim

 # it must be wider than the default to accommodate the long labels
 x11(width=10)
 par(mar=pyramid.plot(dados$masfr,dados$femfr,
  laxlab=c(0,10,20,30,40),raxlab=c(0,10,20,30,40),
  main=Primeiras 10 cancros mais frequentes por sexo,
  top.labels=c(Masculino, Tipo de cancro, Feminino),
  labels=dados[,c(maslab,femlab)],
  xycol=rep(#ff,10),xxcol=rep(#ff88ff,10), gap=25))




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] Labels on a pyramide

2010-02-14 Thread Orvalho Augusto
Pardon my ignorance here.

The Jim code works. But the problem the text comes over the plot.
Adjusting the laxlab and raxlab, to get more plot are, the text keeps
being cut.

And one more thing that might be added as a new functionality is an
option to show the value of the bar.

Thanks for your help

Caveman


On Sun, Feb 14, 2010 at 1:05 PM, Jim Lemon j...@bitwrit.com.au wrote:
 On 02/14/2010 01:27 AM, Orvalho Augusto wrote:

 I am using pyramid.plot() from the plotrix package.
 ...
 The problem is (1) I do not want plot agelabels on the center and (2)
 I want plot different labels for each pair of the bars (one label for
 masculine and the other feminine).

 The data represent the 10 most frequent cancer in a group of individuals.


 Bueno troglodita,
 You have discovered a deficiency in pyramid.plot, and for that you get an
 answer to your question and brand new source code!

 source(pyramid.plot.R)

 after loading the plotrix package. Use it quickly, for it will be in the
 next version of plotrix and then everyone (todo el mundo, hombre!) will be
 using it.

 Jim

 # it must be wider than the default to accommodate the long labels
 x11(width=10)
 par(mar=pyramid.plot(dados$masfr,dados$femfr,
  laxlab=c(0,10,20,30,40),raxlab=c(0,10,20,30,40),
  main=Primeiras 10 cancros mais frequentes por sexo,
  top.labels=c(Masculino, Tipo de cancro, Feminino),
  labels=dados[,c(maslab,femlab)],
  xycol=rep(#ff,10),xxcol=rep(#ff88ff,10), gap=25))




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] Labels on a pyramide

2010-02-13 Thread Orvalho Augusto
I am using pyramid.plot() from the plotrix package.

I have something like this


xy.pop-dados$masfr
xx.pop-dados$femfr
#agelabels-dados$femlab
xycol-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11)
xxcol-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),11)
xylab-dados$maslab
xxlab-dados$femlab
agelabels-xylab

png(piramide9808.png)
par(mar=pyramid.plot(xy.pop,xx.pop,labels=agelabels,top.labels=c(Masculino,,Feminino),
   main=Primeiras 10 cancros mais frequentes por
sexo...,xycol=xycol,xxcol=xxcol,gap=0, labelcex=0))

dev.off()

#

the dados a dataframe fabircated by someother program and looks like:

##
ordem   femlab  femfa   femfr   maslab  masfa   masfr

1   Colo do utero   258 26.76348548 Prostata613 
43.81701215

2   Mama110 11.41078838 Figado  84  6.004288778

3   Esofago 62  6.43153527  Pele70  5.003573981

4   Figado  60  6.22406639  Sarcoma de Kaposi   65  
4.64617584

5   Pele48  4.979253112 Esofago 63  4.503216583

6   Bexiga  37  3.838174274 Pulmao  46  3.288062902

7   Corpo do utero  34  3.526970954 Bexiga  43  3.073624017

8   Utero, SOE28  2.904564315 Penis   33  2.358827734

9   Sarcoma de Kaposi   28  2.904564315 Laringe 27  
1.929949964

10  Vulva e Vagina  24  2.489626556 Colon   24  1.715511079

11  Outras localizacoes 275 28.52697095 Outras localizacoes 
331 23.65975697


#

The problem is (1) I do not want plot agelabels on the center and (2)
I want plot different labels for each pair of the bars (one label for
masculine and the other feminine).

The data represent the 10 most frequent cancer in a group of individuals.

Can some one help please?

Caveman



-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] Labels on a pyramide

2010-02-13 Thread Orvalho Augusto
This is good!

Yes I must learn about dput.

Thank you
Caveman



On Sat, Feb 13, 2010 at 6:57 PM, David Winsemius dwinsem...@comcast.net wrote:
 I took a shot at getting assymetric lableling but it's by no means perfect.
 You really, really ,really, should learn to offer data with dput. See below:


 On Feb 13, 2010, at 9:27 AM, Orvalho Augusto wrote:

 I am using pyramid.plot() from the plotrix package.

 I have something like this

 
 xy.pop-dados$masfr
 xx.pop-dados$femfr
 #agelabels-dados$femlab
 xycol-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11)
 xxcol-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),11)
 xylab-dados$maslab
 xxlab-dados$femlab
 agelabels-xylab

 png(piramide9808.png)

 par(mar=pyramid.plot(xy.pop,xx.pop,labels=agelabels,top.labels=c(Masculino,,Feminino),
      main=Primeiras 10 cancros mais frequentes por
 sexo...,xycol=xycol,xxcol=xxcol,gap=0, labelcex=0))

 dev.off()

 #

 the dados a dataframe fabircated by someother program and looks like:

 ##
 ordem   femlab  femfa   femfr   maslab  masfa   masfr

 1       Colo do utero   258     26.76348548     Prostata        613
 43.81701215

 2       Mama    110     11.41078838     Figado  84      6.004288778

 3       Esofago 62      6.43153527      Pele    70      5.003573981

 4       Figado  60      6.22406639      Sarcoma de Kaposi       65
  4.64617584

 5       Pele    48      4.979253112     Esofago 63      4.503216583

 6       Bexiga  37      3.838174274     Pulmao  46      3.288062902

 7       Corpo do utero  34      3.526970954     Bexiga  43
  3.073624017

 8       Utero, SOE    28      2.904564315     Penis   33
  2.358827734

 9       Sarcoma de Kaposi       28      2.904564315     Laringe 27
  1.929949964

 10      Vulva e Vagina  24      2.489626556     Colon   24
  1.715511079

 11      Outras localizacoes     275     28.52697095     Outras
 localizacoes     331     23.65975697


 In case anyone wants to take a crack at this without the hassle of
 recreating htis dataset...

 dput(dados) can be used to recreate the complete dataframe

 dados - structure(list(ordem = 1:11, femlab = structure(c(2L, 6L, 4L,
 5L, 8L, 1L, 3L, 10L, 9L, 11L, 7L), .Label = c(Bexiga, Colo do utero,
 Corpo do utero, Esofago, Figado, Mama, Outras localizacoes,
 Pele, Sarcoma de Kaposi, Utero SOE, Vulva e Vagina), class =
 factor),
    femfa = c(258L, 110L, 62L, 60L, 48L, 37L, 34L, 28L, 28L,
    24L, 275L), femfr = c(26.76348548, 11.41078838, 6.43153527,
    6.22406639, 4.979253112, 3.838174274, 3.526970954, 2.904564315,
    2.904564315, 2.489626556, 28.52697095), maslab = structure(c(9L,
    4L, 7L, 11L, 3L, 10L, 1L, 8L, 5L, 2L, 6L), .Label = c(Bexiga,
    Colon, Esofago, Figado, Laringe, Outras localizacoes,
    Pele, Penis, Prostata, Pulmao, Sarcoma de Kaposi
    ), class = factor), masfa = c(613L, 84L, 70L, 65L, 63L,
    46L, 43L, 33L, 27L, 24L, 331L), masfr = c(43.81701215, 6.004288778,
    5.003573981, 4.64617584, 4.503216583, 3.288062902, 3.073624017,
    2.358827734, 1.929949964, 1.715511079, 23.65975697)), .Names = c(ordem,
 femlab, femfa, femfr, maslab, masfa, masfr), class =
 data.frame, row.names = c(NA,
 -11L))



 xy.pop-dados$masfr
 xx.pop-dados$femfr
 #agelabels-paste(dados$femlab, \t\t\t, dados$maslab, sep='')
 xycol-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11)
 xxcol-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),11)
 #xylab-dados$maslab
 #xxlab-dados$femlab
 #agelabels-xylab


 par(mar=pyramid.plot(xy.pop, xx.pop, labels= rep(,length(xy.pop)),
 top.labels=c(Masculino, , Feminino),
      main=Primeiras 10 cancros mais frequentes por
 sexo..., xycol=xycol,xxcol=xxcol, gap=0))
 text(-xy.pop-5*nchar(dados$maslab), 1:length(xy.pop), dados$maslab
 );text(xx.pop+7*nchar(dados$femlab), 1:length(xx.pop), dados$femlab )

 # Could not get the right ratio of xx.pop to nchar to get completely correct
 placement and given the  small number you might just want to put in a
 hand-crafted vector,



 #

 The problem is (1) I do not want plot agelabels on the center and (2)
 I want plot different labels for each pair of the bars (one label for
 masculine and the other feminine).

 The data represent the 10 most frequent cancer in a group of individuals.

 Can some one help please?

 Caveman



 --
 OpenSource Software Consultant
 CENFOSS (www.cenfoss.co.mz)
 SP Tech (www.sptech.co.mz)
 email: orvaq...@cenfoss.co.mz
 cell: +258828810980

 __
 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
 Heritage Laboratories
 West Hartford, CT





-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz

Re: [R] Microsoft SQL Server and R

2010-01-27 Thread Orvalho Augusto
RMySQL is for MySQL. MySQL is not MSSQL.

There is not RMSSQL. So the best you have something to conneto
MSSQL... RODBC or you may connect.

Or as Jim point you use a java client to connect to MSSQL through
RJDBC which you may use for example a free jDBC driver like jTDS.

Caveman


On Wed, Jan 27, 2010 at 12:44 PM, Olga Lyashevska o...@herenstraat.nl wrote:
 Hi David,
 I have a client running Microsoft SQL Server. I am interested in
 ways of   accessing data from this server using R.

 Why don't you try RMySQL package? It works fine for me.
        [[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.




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] RMySQL Append data.frame to table

2010-01-25 Thread Orvalho Augusto
May be because by default dbWriteTable has row.names = T.

So try with row.names = F.

Good Luck

Caveman


On Mon, Jan 25, 2010 at 8:57 AM, Nathan S. Watson-Haigh
nathan.watson-ha...@csiro.au wrote:
 I have a data.frame obj with 5 columns whose colnames match the fields in my
 contact table. The only other field my MySQL table has is an id field
 which is the PK and is set to auto increment.

 I'd like to load this data.frame using something like:
 dbWriteTable(con, contact, dat, append=TRUE)

 However, I get this error:
 Error in mysqlExecStatement(conn, statement, ...) :
  RS-DBI driver: (could not run statement: Unknown column 'row_names' in
 'field list')
 [1] FALSE
 Warning message:
 In mysqlWriteTable(conn, name, value, ...) : could not load data into table

 Can anyone shed light on this error, or how I might bulk load this data
 using RMySQL?

 Cheers,
 Nathan

 --
 
 Dr. Nathan S. Watson-Haigh
 OCE Post Doctoral Fellow
 CSIRO Livestock Industries
 University Drive
 Townsville, QLD 4810
 Australia

 Tel: +61 (0)7 4753 8548
 Fax: +61 (0)7 4753 8600
 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

 __
 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.




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] FW: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux

2010-01-15 Thread Orvalho Augusto
Ok.

Caveman


On Thu, Jan 14, 2010 at 5:19 PM, Marcus, Jeffrey
jeffrey.mar...@nuance.com wrote:
 Orvalho:
  Thanks for pointing our RMySQL. The reason is that we have similar data 
 stored in both SQL server and MySQL databases and I want to reuse code as 
 much as possible.

  Jeff


 -Original Message-
 From: Orvalho Augusto [mailto:orvaq...@gmail.com]
 Sent: Wednesday, January 13, 2010 10:57 PM
 To: Marcus, Jeffrey
 Cc: r-help@r-project.org
 Subject: Re: [R] FW: Problems connecting with MySQL using odbcDriverConnect 
 (RODBC package) on Linux

 Thanks you solved and share with us.

 But, why don't you use the RMySQL, which connects to MySQL without the
 need of ODBC?

 Caveman


 On Wed, Jan 13, 2010 at 1:48 AM, Marcus, Jeffrey
 jeffrey.mar...@nuance.com wrote:
 I think I figured this out. I should not have put the Driver name in
 braces. Changing it from {MySQL} to MySQL seems to work.

 -Original Message-
 From: Marcus, Jeffrey
 Sent: Tuesday, January 12, 2010 6:09 PM
 To: 'r-help@r-project.org'
 Subject: Problems connecting with MySQL using odbcDriverConnect (RODBC
 package) on Linux

 I am sure I'm doing something wrong here but not sure what.

 Our system administrator recently installed UnixODBC and the MyODBC
 driver on a Linux box running Linux version 2.6 x86_64.

 I have an .odbc.ini file in my home directory with following lines:

 [mydb]
 Description = MySQL server on my-server
 Driver=/usr/lib64/libmyodbc3.so
 SERVER=my-server

 I can successfully do the following:

 library(RODBC)
 channel - odbcConnect(mydb)
 sqlQuery(channel, show databases)

 And in general, I have no problems using odbcConnect to connect to the
 mydb DSN.

 However, for various reasons I want to make a DSN-less connection
 using odbcDriverConnect. However, everything I've tried generated a
 data source not found message (see below for details)

  After reading through various documents, I tried doing following.

 (1) Put an odbcinst.ini file in my home directory with following lines
 [MySQL]
 Description     = ODBC for MySQL
 Driver=/usr/lib64/libmyodbc3.so
 Setup           = /usr/lib/libodbcmyS.so
 FileUsage       = 1

 (2) Install it with odbcinst -i -f. This seems to work as when I type
 odbcinst -j I get

 DRIVERS: /home/jmarcus/odbcinst.ini
 SYSTEM DATA SOURCES: /home/jmarcus/odbc.ini
 USER DATA SOURCES..: /home/jmarcus/.odbc.ini


 (2) Set the environment variable to point to this file:

 bash-3.2$  ODBCSYSINI=/home/jmarcus
 bash-3.2$ export ODBCSYSINI

 (3) Start R

 Note that R has inherited environment variable
 Sys.getenv(ODBCSYSINI)

     ODBCSYSINI
 /home/jmarcus

 (4) Try to connect to the MySQL server

   conn -
 odbcDriverConnect(connection=Driver={MySQL};Server=my-server;Database=m
 y_database;Uid=my_username;Pwd=my_password)

 This generates following:

 Warning messages:
 1: In odbcDriverConnect(connection =
 Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw
 d=my_password) :
  [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
 Manager]Data source name not found, and no default driver specified
 2: In odbcDriverConnect(connection =
 Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw
 d=my_password) :
  ODBC connection failed


 Can anyone see what I'm doing wrong? Thanks.

  Jeff

 __
 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.




 --
 OpenSource Software Consultant
 CENFOSS (www.cenfoss.co.mz)
 SP Tech (www.sptech.co.mz)
 email: orvaq...@cenfoss.co.mz
 cell: +258828810980




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] FW: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux

2010-01-13 Thread Orvalho Augusto
Thanks you solved and share with us.

But, why don't you use the RMySQL, which connects to MySQL without the
need of ODBC?

Caveman


On Wed, Jan 13, 2010 at 1:48 AM, Marcus, Jeffrey
jeffrey.mar...@nuance.com wrote:
 I think I figured this out. I should not have put the Driver name in
 braces. Changing it from {MySQL} to MySQL seems to work.

 -Original Message-
 From: Marcus, Jeffrey
 Sent: Tuesday, January 12, 2010 6:09 PM
 To: 'r-help@r-project.org'
 Subject: Problems connecting with MySQL using odbcDriverConnect (RODBC
 package) on Linux

 I am sure I'm doing something wrong here but not sure what.

 Our system administrator recently installed UnixODBC and the MyODBC
 driver on a Linux box running Linux version 2.6 x86_64.

 I have an .odbc.ini file in my home directory with following lines:

 [mydb]
 Description = MySQL server on my-server
 Driver=/usr/lib64/libmyodbc3.so
 SERVER=my-server

 I can successfully do the following:

 library(RODBC)
 channel - odbcConnect(mydb)
 sqlQuery(channel, show databases)

 And in general, I have no problems using odbcConnect to connect to the
 mydb DSN.

 However, for various reasons I want to make a DSN-less connection
 using odbcDriverConnect. However, everything I've tried generated a
 data source not found message (see below for details)

  After reading through various documents, I tried doing following.

 (1) Put an odbcinst.ini file in my home directory with following lines
 [MySQL]
 Description     = ODBC for MySQL
 Driver=/usr/lib64/libmyodbc3.so
 Setup           = /usr/lib/libodbcmyS.so
 FileUsage       = 1

 (2) Install it with odbcinst -i -f. This seems to work as when I type
 odbcinst -j I get

 DRIVERS: /home/jmarcus/odbcinst.ini
 SYSTEM DATA SOURCES: /home/jmarcus/odbc.ini
 USER DATA SOURCES..: /home/jmarcus/.odbc.ini


 (2) Set the environment variable to point to this file:

 bash-3.2$  ODBCSYSINI=/home/jmarcus
 bash-3.2$ export ODBCSYSINI

 (3) Start R

 Note that R has inherited environment variable
 Sys.getenv(ODBCSYSINI)

     ODBCSYSINI
 /home/jmarcus

 (4) Try to connect to the MySQL server

   conn -
 odbcDriverConnect(connection=Driver={MySQL};Server=my-server;Database=m
 y_database;Uid=my_username;Pwd=my_password)

 This generates following:

 Warning messages:
 1: In odbcDriverConnect(connection =
 Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw
 d=my_password) :
  [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
 Manager]Data source name not found, and no default driver specified
 2: In odbcDriverConnect(connection =
 Driver={MySQL};Server=my-server;Database=my_database;Uid=my_username;Pw
 d=my_password) :
  ODBC connection failed


 Can anyone see what I'm doing wrong? Thanks.

  Jeff

 __
 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.




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] Tables to export to excel

2010-01-10 Thread Orvalho Augusto
I am doing some tables with verry long and numerouses categories. Eg.
Cause of Death Crossed by sex e then by group ages.

Is it possible to have such crosstab sent to an excel file so I could
easilly report.

Thanks in advance

Caveman

-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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 dbReadTable() only a limited number of rows? (RMySQL)

2009-12-25 Thread Orvalho Augusto
Try this
drv - dbDriver(MySQL)
con(drv, etc parameters...)
 dbGetQuery(con, select * from tableyoulike limit N_integer_first_records)

Hope it helps
Caveman


On Fri, Dec 25, 2009 at 12:10 AM, Peng Yu pengyu...@gmail.com wrote:
 I only want to load a limited number of rows by dbReadTable(). I don't
 see an option in the help. Is there an option to do so?

 __
 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.




-- 
OpenSource Software Consultant
CENFOSS (www.cenfoss.co.mz)
SP Tech (www.sptech.co.mz)
email: orvaq...@cenfoss.co.mz
cell: +258828810980

__
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] Writing a data frame in an excel file

2009-11-18 Thread Orvalho Augusto
Why don't try the fabulous WRITEXLS package?

Caveman


On Wed, Nov 18, 2009 at 7:45 PM, anna_l lippelann...@hotmail.com wrote:

 Thanks Karl, well I am getting an error now after the following sqlSave
 command:
 sqlSave( xlsFile, datas, tablename = 'Datas_and_coefficients', rownames =
 FALSE )

 --  [RODBC] Failed exec in Update
 22018 39 [Microsoft][Driver ODBC for Excel]invalid character value for the
 diffusion specification (null) (null)


 More specifically, take a look at the 'append' and 'safer' arguments.

 --
 Karl Ove Hufthammer

 __
 R-help@r-project.org mailing list

 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




 -
 Anna Lippel
 new in R so be careful I should be asking a lt of questions!:teeth:
 --
 View this message in context: 
 http://old.nabble.com/Writing-a-data-frame-in-an-excel-file-tp26378240p26412410.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-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] RMySQL and Stored procedures

2009-11-01 Thread Orvalho Augusto
Can someone provide me a good way to circumvent the lack of calling
Stored Procedures from RMySQL?

I can not rewrite those stored procedures on R because there a lot
more folks here that only understands SQL.

The stored procedure returns a resultset.

Thanks
Caveman

__
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] Warning message when Loading package svMisc in R 2.10.0

2009-10-27 Thread Orvalho Augusto
I did not try. But you try to update all the packages with:
update.packages()

Good luck
Caveman

On Tue, Oct 27, 2009 at 6:28 AM, Qi Li ericq...@hotmail.com wrote:
 Hi,

 I have a problem when using R 2.10.0,

 Loading required package: svMisc
 Warning message:
 package 'svMisc' was built under R version 2.9.1 and help will not work 
 correctly

 HOW to fix it?
 __
 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] Antropometrics with R

2009-10-27 Thread Orvalho Augusto
Hey greate ones, is there any way to have something similar to stata
zanthro on R?

I want a package that contains functions to give antropometric values,
at least for the children.

Caveman

__
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] RODBC sqlSave does not append the records to a DB2 table

2009-10-20 Thread Orvalho Augusto
Now it becomes strange.

One thing I note from this generated query:
INSERT INTO STORAGE.TEST_APPEND2 ( MACRONAME, MACROUSER,
MACRO_RT ) VALUES ( 's_ej_mach_config_vz', 'jones2', 5 )

The names of the variables are in double quotes; That is a problem.
Can you try to run this query on another application and see what you
get.

Caveman


On Tue, Oct 20, 2009 at 7:05 PM, Elaine Jones jon...@us.ibm.com wrote:
 Hi Felipe,
 Thanks for your message. Your approach works for an Access database. I am
 trying to insert records into a table in a DB2 database on a remote AIX
 server.
 My userid has the authority to insert records, and I am able to do that
 using another application (DB2 Client command line).
 Sincerely,
  Elaine McGovern Jones 

  ISC Tape and DASD Storage Products
     Characterization and Failure Analysis Engineering
       Phone:  408  705-9588  Internal tieline: 587-9588
       jon...@us.ibm.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-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] RODBC sqlSave does not append the records to a DB2 table

2009-10-20 Thread Orvalho Augusto
Well I do not know what could be happening.

I tried to append records to a table on DB2 (community Edition 9.5 on
a Linux machine). And it works greatly. The only odd thing (may be
because of my low skills on DB2) is I could not create neither append
to a table on a different schema than dbuser (actually my account was
dbuser).

My R version is 2.7.1 under another Linux PC and RODBC is 1.2-3.

Caveman

On Tue, Oct 20, 2009 at 8:45 PM, Elaine Jones jon...@us.ibm.com wrote:
 The query generated by R looks ok to me. I went ahead and pasted it into my
 DB2 Client command editor. And I got the message confirmation message.

 INSERT INTO STORAGE.TEST_APPEND2 ( MACRONAME, MACROUSER, MACRO_RT )
 VALUES ( 's_ej_mach_config_vz', 'jones2', 5 )

 DB2I The SQL command completed successfully.

 And I confirmed the record was added to the table.

  Elaine McGovern Jones 

 ISC Tape and DASD Storage Products
 Characterization and Failure Analysis Engineering
 Phone: 408 705-9588 Internal tieline: 587-9588
 jon...@us.ibm.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] Import SPSS file to R

2009-10-19 Thread Orvalho Augusto
Or even

 install.packages(Hmisc)
 library(Hmisc)

then use spss.get

Actually spss.get uses read.spss from foreign package but with common
default options.

Caveman

On Mon, Oct 19, 2009 at 3:18 PM, Jorge Ivan Velez
jorgeivanve...@gmail.com wrote:
 Hi Suman,
 See the read.spss function in the foreign package, e.g.:

 # install.packages(foreign)
 require(foreign)
 ?read.spss

 HTH,
 Jorge



 On Mon, Oct 19, 2009 at 8:06 AM, Suman Kundu  wrote:

 Hello,

 In R, How to read SPSS file and access the data item?

 Thank you.
 Regards,
 Suman Kundu




        [[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.



        [[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.


Re: [R] RODBC sqlSave does not append the records to a DB2 table

2009-10-17 Thread Orvalho Augusto
Hello!

Before you try from R. Can you tell us what happens when you use
another DB2 client when you try with those credentials?

One thing to note: If you are trying to access DB2 from ODBC on Linux
on DB2 versions before 9.4 there are some particular issues and better
check this 
http://holmwood.id.au/~lindsay//2007/10/26/setting-up-unixodbc-with-a-remote-db2/

Caveman


On Sat, Oct 17, 2009 at 1:33 AM, Elaine Jones jon...@us.ibm.com wrote:


 I am running R version 2.9.2 on  Windows XP OS with RODBC version Version:
 1.3-0.

 Has anyone out there in the R user community successfully appended records
 to a DB2 table on a remote database using the sqlSave function in the RODBC
 package? (or by any other means from R?)

 I posed a similar question a few months ago and unfortunately, did not
 receive a response.  I was hoping recent upgrades to our DB2 on the
 database, and I installed the current version RODBC. Unfortunately, it did
 not bring any joy. I asked the database adminstrator try it, and she had a
 similar experience.  No error message is returned, but the record is not
 inserted to the table.

 For testing purposes, I have a very simple one-row, three-column
 data.frame (se2) I want to insert into a DB2 table.

 sqlSave(channel, se2, tablename = STORAGE.TEST_APPEND2, append = TRUE,
 +         rownames = FALSE, colnames = FALSE,
 +         verbose = TRUE,
 +         safer = TRUE, addPK = FALSE,
 +   fast = FALSE, test = FALSE, nastring = NULL)

 Query: INSERT INTO STORAGE.TEST_APPEND2 ( MACRONAME, MACROUSER,
 MACRO_RT ) VALUES ( 's_ej_mach_config_vz', 'jones2', 5 )


 I don't get any error message, but when I check the table row count, the
 record has not been added to the table.

 Any suggestions for how to resolve are appreciated!
 Sincerely,

  Elaine McGovern Jones 

  ISC Tape and DASD Storage Products
     Characterization and Failure Analysis Engineering
       Phone:  408  705-9588  Internal tieline: 587-9588
       jon...@us.ibm.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-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] SPSS long variable names

2009-10-15 Thread Orvalho Augusto
Impressive!

PSPP produces the sav fine. The sav file produced by the PSPP is seen
by SPSS (16) with the long names.

I attach my sav produced by the PSPP. And I start to suspect my
foreign package version:
I am using 0.8.26-1 from the r-cran-foreign a Ubuntu 8.10 package. Can
you tell me your version? I am updating mine.

Thanks guys.

Caveman


On Thu, Oct 15, 2009 at 9:02 PM, Robert  Baer rb...@atsu.edu wrote:
 The problem is the limit of 8 characters long on variable
 names.[in read.spss??]

 I just created a file in SPSS 17 and saved it in standard format (.sav) The
 file had four unique variable NAMES which were much longer than 8 characters
 (although not 64).  I entered two rows of data and saved the file again. The
 variable view in SPSS looked like the following for the 4 variables I
 created.  (unique in the first postition after the first 9)

 a12345678901234567890987654321098765432011 Numeric 8 2
 a1234567890 None None 14 Right Scale
 a1234567899123456789098765432109876543201 Date 9 0 b1234567890 None None 14
 Right Scale
 a1234567898123456789098765432109876543201 String 8 0 c1234567890 None None
 14 Left Nominal
 a1234567897123456789098765432109876543201 Numeric 8 2 d1234567890 None None
 14 Right Scale

 I now started R and used read.spss() from the foreign package using the
 following code  The data frame I read in seemed to reflect the original
 file with respect to column names:

 library(foreign)
 c=read.spss(file.choose(),to.data.frame=TRUE)
 c

  a12345678901234567890987654321098765432011
 a1234567899123456789098765432109876543201
 a1234567898123456789098765432109876543201
 1                                                   33.3 13452825600
                          a cat
 2                                                   22.2 1346328
                          dog
  a1234567897123456789098765432109876543201
 1                                     32165
 2                                 321654987

 It appears these long variable names read in just fine.  Thus, I would ask
 caveman whether the problem is really an R problem at all, or is it a
 problem with PSPP writing (in which case this would be the wrong list to be
 discussing it on)?

 R

__
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] SPSS long variable names

2009-10-15 Thread Orvalho Augusto
Robert you are right. I updated the foreign package and I can read
long names now

I have checked the changelog and I found that long names reading were
introduced after 0.8.29 while I were using 0.8.26-1.

So I am really sorry guys for this mess. R can read long names.

Caveman


On Thu, Oct 15, 2009 at 9:42 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Impressive!

 PSPP produces the sav fine. The sav file produced by the PSPP is seen
 by SPSS (16) with the long names.

 I attach my sav produced by the PSPP. And I start to suspect my
 foreign package version:
 I am using 0.8.26-1 from the r-cran-foreign a Ubuntu 8.10 package. Can
 you tell me your version? I am updating mine.

 Thanks guys.

 Caveman


 On Thu, Oct 15, 2009 at 9:02 PM, Robert  Baer rb...@atsu.edu wrote:
 The problem is the limit of 8 characters long on variable
 names.[in read.spss??]

 I just created a file in SPSS 17 and saved it in standard format (.sav) The
 file had four unique variable NAMES which were much longer than 8 characters
 (although not 64).  I entered two rows of data and saved the file again. The
 variable view in SPSS looked like the following for the 4 variables I
 created.  (unique in the first postition after the first 9)

 a12345678901234567890987654321098765432011 Numeric 8 2
 a1234567890 None None 14 Right Scale
 a1234567899123456789098765432109876543201 Date 9 0 b1234567890 None None 14
 Right Scale
 a1234567898123456789098765432109876543201 String 8 0 c1234567890 None None
 14 Left Nominal
 a1234567897123456789098765432109876543201 Numeric 8 2 d1234567890 None None
 14 Right Scale

 I now started R and used read.spss() from the foreign package using the
 following code  The data frame I read in seemed to reflect the original
 file with respect to column names:

 library(foreign)
 c=read.spss(file.choose(),to.data.frame=TRUE)
 c

  a12345678901234567890987654321098765432011
 a1234567899123456789098765432109876543201
 a1234567898123456789098765432109876543201
 1                                                   33.3 13452825600
                          a cat
 2                                                   22.2 1346328
                          dog
  a1234567897123456789098765432109876543201
 1                                     32165
 2                                 321654987

 It appears these long variable names read in just fine.  Thus, I would ask
 caveman whether the problem is really an R problem at all, or is it a
 problem with PSPP writing (in which case this would be the wrong list to be
 discussing it on)?

 R



__
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] SPSS long variable names

2009-10-14 Thread Orvalho Augusto
Hi

The .dat file is a tab delimited file with the long variables names on
it. The .sps file has the instructions to read the .dat and place all
the variable and value labels.

The ideia of reading the dat directely is good but I need the labels
placed. Yes I could read the dat file and parese myself the sps to get
sps file but that it is a job that to try and by these mails I will
have to do so.

For now what I made a little script to generate the sav using pspp;
Then I read the sav with read.spss. Then I call read.delim to read the
long names on the dat file. It works but is not beautfull and uses
more resources.

The great thing would be to support long variables names on read.spss.

Thanks guys for everything
Caveman

On Wed, Oct 14, 2009 at 4:52 PM, joris meys jorism...@gmail.com wrote:
 Hi Orvalho,

 question : where do the .dat files come from and what do you have to
 do with the SPSS syntax files. I guess the syntax file is to change
 the .dat file into SPSS format. But you could take the shortcut and
 read in the .dat file directly. If the SPSS syntax file is a text file
 (which should be), you can construct your own function to read in all
 specifications from the syntax file. the function regexp() can be a
 great help for that.

 If you have no clue how to do that, just send me an example, and I'll
 take a look.

 Cheers
 Joris

 On Sat, Oct 10, 2009 at 6:14 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Hello guys I am new to this list and for R too.

 I am wondering if there is a patch for the SPSS reading code on the
 foreign package, in order to be able to read long variable names.
 Right now read.spss() just trunc the names to 8 characters.

 Or if someone could help me on other way:
 I have to process everyday a lot of SPSS Syntax Files and Dat files
 that come from one system that can only export data on through that
 way.

 I use PSPP to generate the spss data file (sav) that I read with R.
 From R I can export to MySQL, DBF and STATA to satisfy the needs of
 different guys here.

 The problem is the limit of 8 characters long on variable names.

 Can someone help on that?

 Caveman

 __
 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] SPSS long variable names

2009-10-14 Thread Orvalho Augusto
Ok.

I will try that then.

Caveman


On Wed, Oct 14, 2009 at 6:53 PM, joris meys jorism...@gmail.com wrote:
 You could read in the sps file in R with readLines() for example, and
 then use the tools for regular expression and substring to find the
 label statements. Then you can just use R to add the labels to it,
 without having to pass through PSPP.

 So you could actually just create an R script that takes both files as
 input, and generates the output automatically. I's prefer to do it
 that way than to use YAP (yet another program), while waiting for the
 adaptation of read.spss...

 Cheers
 Joris

 On Wed, Oct 14, 2009 at 5:48 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Hi

 The .dat file is a tab delimited file with the long variables names on
 it. The .sps file has the instructions to read the .dat and place all
 the variable and value labels.

 The ideia of reading the dat directely is good but I need the labels
 placed. Yes I could read the dat file and parese myself the sps to get
 sps file but that it is a job that to try and by these mails I will
 have to do so.

 For now what I made a little script to generate the sav using pspp;
 Then I read the sav with read.spss. Then I call read.delim to read the
 long names on the dat file. It works but is not beautfull and uses
 more resources.

 The great thing would be to support long variables names on read.spss.

 Thanks guys for everything
 Caveman

 On Wed, Oct 14, 2009 at 4:52 PM, joris meys jorism...@gmail.com wrote:
 Hi Orvalho,

 question : where do the .dat files come from and what do you have to
 do with the SPSS syntax files. I guess the syntax file is to change
 the .dat file into SPSS format. But you could take the shortcut and
 read in the .dat file directly. If the SPSS syntax file is a text file
 (which should be), you can construct your own function to read in all
 specifications from the syntax file. the function regexp() can be a
 great help for that.

 If you have no clue how to do that, just send me an example, and I'll
 take a look.

 Cheers
 Joris

 On Sat, Oct 10, 2009 at 6:14 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Hello guys I am new to this list and for R too.

 I am wondering if there is a patch for the SPSS reading code on the
 foreign package, in order to be able to read long variable names.
 Right now read.spss() just trunc the names to 8 characters.

 Or if someone could help me on other way:
 I have to process everyday a lot of SPSS Syntax Files and Dat files
 that come from one system that can only export data on through that
 way.

 I use PSPP to generate the spss data file (sav) that I read with R.
 From R I can export to MySQL, DBF and STATA to satisfy the needs of
 different guys here.

 The problem is the limit of 8 characters long on variable names.

 Can someone help on that?

 Caveman

 __
 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] SPSS long variable names

2009-10-13 Thread Orvalho Augusto
Thanks for the answer.

Hmisc uses read.spss from the foreign package. And so it does not
solve my trouble.

I need to read the long names on the SPSS dataset.

Caveman


On Tue, Oct 13, 2009 at 3:01 PM, John Kane jrkrid...@yahoo.ca wrote:
 library(Hmisc) spss.get may do it but it's been some time since I used it.

 --- On Sat, 10/10/09, Orvalho Augusto orvaq...@gmail.com wrote:

 From: Orvalho Augusto orvaq...@gmail.com
 Subject: [R] SPSS long variable names
 To: r-help@r-project.org
 Received: Saturday, October 10, 2009, 12:14 PM
 Hello guys I am new to this list and
 for R too.

 I am wondering if there is a patch for the SPSS reading
 code on the
 foreign package, in order to be able to read long variable
 names.
 Right now read.spss() just trunc the names to 8
 characters.

 Or if someone could help me on other way:
 I have to process everyday a lot of SPSS Syntax Files and
 Dat files
 that come from one system that can only export data on
 through that
 way.

 I use PSPP to generate the spss data file (sav) that I read
 with R.
 From R I can export to MySQL, DBF and STATA to satisfy
 the needs of
 different guys here.

 The problem is the limit of 8 characters long on variable
 names.

 Can someone help on that?

 Caveman

 __
 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.



      __
 The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
 Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/


__
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] SPSS long variable names

2009-10-13 Thread Orvalho Augusto
Thanks guys for the greaty ideia!!

I am fool because I did not realize that before.

Caveman


On Tue, Oct 13, 2009 at 4:41 PM, joris meys jorism...@gmail.com wrote:
 Just for clarity : the csv format will solve your problem, as the
 restrictions on the variable names will only depend on the program you
 use to load them. I never experienced problems with variable names
 using csv to switch datasets between SPlus, R, SAS and SPSS.

 Cheers
 Joris

 On Tue, Oct 13, 2009 at 4:35 PM, joris meys jorism...@gmail.com wrote:
 Sorry to be so blunt, but I cannot believe PSPP can't save a dataset
 as a .csv file for example. That should be the prefered format to
 transport a dataset to any other statistical package, including R. csv
 files are universal.

 Cheers
 Joris

 On Tue, Oct 13, 2009 at 3:30 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Thanks for the answer.

 Hmisc uses read.spss from the foreign package. And so it does not
 solve my trouble.

 I need to read the long names on the SPSS dataset.

 Caveman


 On Tue, Oct 13, 2009 at 3:01 PM, John Kane jrkrid...@yahoo.ca wrote:
 library(Hmisc) spss.get may do it but it's been some time since I used it.

 --- On Sat, 10/10/09, Orvalho Augusto orvaq...@gmail.com wrote:

 From: Orvalho Augusto orvaq...@gmail.com
 Subject: [R] SPSS long variable names
 To: r-help@r-project.org
 Received: Saturday, October 10, 2009, 12:14 PM
 Hello guys I am new to this list and
 for R too.

 I am wondering if there is a patch for the SPSS reading
 code on the
 foreign package, in order to be able to read long variable
 names.
 Right now read.spss() just trunc the names to 8
 characters.

 Or if someone could help me on other way:
 I have to process everyday a lot of SPSS Syntax Files and
 Dat files
 that come from one system that can only export data on
 through that
 way.

 I use PSPP to generate the spss data file (sav) that I read
 with R.
 From R I can export to MySQL, DBF and STATA to satisfy
 the needs of
 different guys here.

 The problem is the limit of 8 characters long on variable
 names.

 Can someone help on that?

 Caveman

 __
 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.



      __
 The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for 
 Yahoo!  Get it Now for Free! at 
 http://downloads.yahoo.com/ca/internetexplorer/


 __
 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] SPSS long variable names

2009-10-13 Thread Orvalho Augusto
No!

That is variable labels.

Caveman


On Tue, Oct 13, 2009 at 4:52 PM, Robert  Baer rb...@atsu.edu wrote:
 I am wondering if there is a patch for the SPSS reading
 code on the
 foreign package, in order to be able to read long variable
 names.
 Right now read.spss() just trunc the names to 8
 characters.

 This sequence seems to access the long filenames for me if I know what you
 are asking for:

 library('foreign')
 a-read.spss('fil.sav')
 lnames - attr(a,variable.labels,exact=FALSE)

 Rob




__
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] SPSS long variable names

2009-10-13 Thread Orvalho Augusto
Sadlly exportation to csv or another format is not implemented yet:
http://www.gnu.org/software/pspp/manual/html_node/Not-Implemented.html

Caveman


On Tue, Oct 13, 2009 at 4:41 PM, joris meys jorism...@gmail.com wrote:
 Just for clarity : the csv format will solve your problem, as the
 restrictions on the variable names will only depend on the program you
 use to load them. I never experienced problems with variable names
 using csv to switch datasets between SPlus, R, SAS and SPSS.

 Cheers
 Joris

 On Tue, Oct 13, 2009 at 4:35 PM, joris meys jorism...@gmail.com wrote:
 Sorry to be so blunt, but I cannot believe PSPP can't save a dataset
 as a .csv file for example. That should be the prefered format to
 transport a dataset to any other statistical package, including R. csv
 files are universal.

 Cheers
 Joris

 On Tue, Oct 13, 2009 at 3:30 PM, Orvalho Augusto orvaq...@gmail.com wrote:
 Thanks for the answer.

 Hmisc uses read.spss from the foreign package. And so it does not
 solve my trouble.

 I need to read the long names on the SPSS dataset.

 Caveman


 On Tue, Oct 13, 2009 at 3:01 PM, John Kane jrkrid...@yahoo.ca wrote:
 library(Hmisc) spss.get may do it but it's been some time since I used it.

 --- On Sat, 10/10/09, Orvalho Augusto orvaq...@gmail.com wrote:

 From: Orvalho Augusto orvaq...@gmail.com
 Subject: [R] SPSS long variable names
 To: r-help@r-project.org
 Received: Saturday, October 10, 2009, 12:14 PM
 Hello guys I am new to this list and
 for R too.

 I am wondering if there is a patch for the SPSS reading
 code on the
 foreign package, in order to be able to read long variable
 names.
 Right now read.spss() just trunc the names to 8
 characters.

 Or if someone could help me on other way:
 I have to process everyday a lot of SPSS Syntax Files and
 Dat files
 that come from one system that can only export data on
 through that
 way.

 I use PSPP to generate the spss data file (sav) that I read
 with R.
 From R I can export to MySQL, DBF and STATA to satisfy
 the needs of
 different guys here.

 The problem is the limit of 8 characters long on variable
 names.

 Can someone help on that?

 Caveman

 __
 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.



      __
 The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for 
 Yahoo!  Get it Now for Free! at 
 http://downloads.yahoo.com/ca/internetexplorer/


 __
 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] SPSS long variable names

2009-10-10 Thread Orvalho Augusto
Hello guys I am new to this list and for R too.

I am wondering if there is a patch for the SPSS reading code on the
foreign package, in order to be able to read long variable names.
Right now read.spss() just trunc the names to 8 characters.

Or if someone could help me on other way:
I have to process everyday a lot of SPSS Syntax Files and Dat files
that come from one system that can only export data on through that
way.

I use PSPP to generate the spss data file (sav) that I read with R.
From R I can export to MySQL, DBF and STATA to satisfy the needs of
different guys here.

The problem is the limit of 8 characters long on variable names.

Can someone help on that?

Caveman

__
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.