Re: [R] Tendonitis and R users

2012-09-04 Thread Alexandre Aguiar
Keith Jewell k.jew...@campden.co.uk escreveu:
When I suffered from wrist pain I found changing from a standard mouse 
to a cordless trackball gave rapid and complete relief.


A mousepad with a jelly support for the wrist cured my pain.
One can find several tenths of websites with plenty of useful information on 
prevention and treatment of wrist pains of computer users. Googling around a 
little will surely be more effective and efficient getting information. 
However, the best website will never provide tailored solutions and medical 
counseling may be  advisable, very especially in the case of an athlete as it 
seems to be the case of the original poster.

Best wishes.


--

Alexandre Aguiar, MD SCT
SPS Consultoria

-- 
Sent from my tablet. Please, excuse my brevity.
Enviado do tablet. Por favor, perdoe a brevidade.
Publié de le tablet. S'il vous plaît pardonnez la brièveté.
Veröffentlicht aus dem Tablet. Bitte verzeihen Sie die Kürze.
Enviado desde mi tablet. Por favor, disculpen mi brevedad.
Inviato dal mio tablet. Per favore, scusate la mia brevità.

__
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] What makes R different from other programming languages?

2012-08-22 Thread Alexandre Aguiar
Hi.

Em Ter 21 Ago 2012, Mark Dalphin escreveu:
 I guess the other aspect which I take the most time to describe to any
 programmer from other more traditional languages is the working with
 vectors. To use R effectively, you must move data in large chunks; the
 standard paradigm of looping over the data is the fastest way to write
 a slow program.

That's what makes R kind of hybrid: both procedural and declarative. 
Declaring objects and its predicates and have all fully and efficiently 
processed without programming every single step may be shocking for those 
who only know the 'procedural way'. Except for the experience with SQL 
with which we do not write 'SQL programs', most programmers (including 
amateur programmers) never had contact with the declarative programming 
paradigm. Many may have never heard of Prolog, for instance.

Cheers.


-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT

gpg public key: mailto:gpg...@asaguiar.net


signature.asc
Description: This is a digitally signed message part.
__
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] What makes R different from other programming languages?

2012-08-21 Thread Alexandre Aguiar
cbe...@tajo.ucsd.edu escreveu:
This rather unlikely linguistic cocktail would probably never have
been prepared by computer scientists, yet the language has become
surprisingly popular.


A linguist that is a good friend once observed that language is both expression 
and a modeller of how we think. No matter in which extent each one is true, the 
'expression' property has some compelling evidence in support: it has been 
demonstrated that human babies generate the same words and phonemes without 
regard to the culture of their parents, that is, everywhere babies generate a 
common babies' language.

In everyday life, each profession has its technical jargon and even a peculiar 
slang (not to mention the set of jokes :-) ). In computing, it is remarkable 
that different languages developed by the same person are extremely similar: 
Nicklaus Wirth's Pascal and Modula 2 have almost identical syntax, use the same 
function naming and  calling conventions, etc.

From this angle, it does not look strange that R is peculiar and can even be 
regarded as a new, more free paradigm with regard to control structures and 
yet hold all the features of a structured language. And although a procedural 
language there are some instances in which R resembles a declarative language 
(IMHO, this could be extended, enhanced :-D).



--

Alexandre Aguiar, MD SCT
SPS Consultoria

-- 
Sent from my tablet. Please, excuse my brevity.
Enviado do tablet. Por favor, perdoe a brevidade.
Publié de le tablet. S'il vous plaît pardonnez la brièveté.
Veröffentlicht aus dem Tablet. Bitte verzeihen Sie die Kürze.
Enviado desde mi tablet. Por favor, disculpen mi brevedad.
Inviato dal mio tablet. Per favore, scusate la mia brevità.

__
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] pass by reference

2012-08-15 Thread Alexandre Aguiar
Em Ter 14 Ago 2012, Bert Gunter escreveu:
 (Offlist, as my comments are not worth bothering the list about).

(offlist as well) :-)

 R is what it is.

And it can even do things it was not designed for, including indirection 
to internal data, through extensions.

Thanks.


-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT

gpg public key: mailto:gpg...@asaguiar.net

__
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] pass by reference

2012-08-13 Thread Alexandre Aguiar
Sachinthaka Abeywardana sachin.abeyward...@gmail.com escreveu:
Think you are missing the point,

As lover of C-style pointers, I must admit that hiding complexities (and 
associated problems) of pointers is a great feature of all successful high 
level languages (HLLs). As much as they spare time and can be easily learned by 
non-programmers, they impose penalties in performance and memory consumption. 
Most drawbacks of HLLs have been effectively and efficiently addressed by a 
number of strategies in such a way that currently we have a wide variety of 
options. Languages have become tools to solve problems and, as such, we must 
pick the proper tool for each problem. That means the very first step is 
properly assessing the problem.

My 2 cents.


--

Alexandre Aguiar, MD SCT
SPS Consultoria

-- 
Sent from my tablet. Please, excuse my brevity.
Enviado do tablet. Por favor, perdoe a brevidade.
Publié de le tablet. S'il vous plaît pardonnez la brièveté.
Veröffentlicht aus dem Tablet. Bitte verzeihen Sie die Kürze.
Enviado desde mi tablet. Por favor, disculpen mi brevedad.
Inviato dal mio tablet. Per favore, scusate la mia brevità.

__
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] yet another update error

2012-04-01 Thread Alexandre Aguiar
Hi,

After upgrading R I always update installed packages to the new version. 
This time an error I have never seen or heard of appeared: thousands, 
perhaps millions of lines like the ones below.

--8--
error reading package index 
file /usr/local/lib/R/library/tcltk2/tklibs/datefield0.2/pkgIndex.tcl: 
too many nested evaluations (infinite loop?)
error reading package index 
file /usr/local/lib/R/library/tcltk2/tklibs/tooltip1.4/pkgIndex.tcl: too 
many nested evaluations (infinite loop?)
error reading package index 
file /usr/local/lib/R/library/tcltk2/tklibs/ttktheme_plastik/pkgIndex.tcl: 
too many nested evaluations (infinite loop?)
error reading package index 
file /usr/local/lib/R/library/tcltk2/tklibs/ttktheme_keramik/pkgIndex.tcl: 
too many nested evaluations (infinite loop?)
error reading package index 
file /usr/local/lib/R/library/tcltk2/tklibs/getstring0.1/pkgIndex.tcl: 
too many nested evaluations (infinite loop?)
--8--

Left the process running during almost four hours and not only never 
returned but also had to be explcitly killed (ctrl-c won't do the job).

Attached here the scripts I use to perform all upgrades and updates 
unattended as cron jobs. But don't think they are the culprits. :-)

Thanks.



-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT

gpg public key: mailto:gpg...@asaguiar.net


signature.asc
Description: This is a digitally signed message part.
__
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] yet another update error

2012-04-01 Thread Alexandre Aguiar
Em Dom 01 Abr 2012, Alexandre Aguiar escreveu:
 error reading package index
 file /usr/local/lib/R/library/tcltk2/tklibs/datefield0.2/pkgIndex.tcl:
 too many nested evaluations (infinite loop?)

Sorry. Sorry. Had not uninstalled 2.14.2 before installing 2.15.0.

 But don't think they are the culprits. :-)

I admit. Faulty script. :-)

Thank you.



-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT

gpg public key: mailto:gpg...@asaguiar.net


signature.asc
Description: This is a digitally signed message part.
__
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] heavy processing during R_init_XXXXX()

2011-08-07 Thread Alexandre Aguiar
Hi.

Need some advice. I have to load a library during R_init_X() with 
dlopen(). The library file is 23 megabytes long and loads several other 
libraries. Everything happens during dlopen() execution, out of control, 
and takes around 1 second on first load in a quadcore. Besides, due to 
security reasons, a hash of the library file is going to be computed. 
Still do not know how long it will take.

Questions.

Is 1 second acceptable for R? Slower machines may take a lot longer to 
return from R_init_X(). Does R_init_X() have to return soon or 
call R_CheckUserInterrupt()? Or is it somehow free from this R need?

Is it safe to load the second library and compute the hash within other 
threads so R_init_X goes on? If some function of my extension library 
is called it can call R_CheckUserInterrupt() if and while the threads do  
not end. If such use of threads is safe inside R, is there a package that 
does it? Any tips?

Flags currently sent to dlopen are (RTLD_LAZY | RTLD_LOCAL). Revolving the 
R sources could not find the flags R uses. Does any of you know for sure 
the flags used to load extensions with loadLibrary()? Looking into 
computeDLOpenFlag() did not answer the question. Is there a recommended 
flags set in this situation?

Aparently dlopen() flags LM_ID_BASE and RTLD_GROUP (their use sounds wise) 
are not defined in Linux. Is this correct or I missed something?

Thanks.

-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT


signature.asc
Description: This is a digitally signed message part.
__
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] boolean SEXP interpretation upon function return

2011-08-04 Thread Alexandre Aguiar
Hi,

When a function returns a SEXP of type LGLSXP (logical) to signal whether 
it succeeded or failed, how is it intrepreted? Is it like C where SUCCESS 
= 0 or other value?

Thanks.


-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT


signature.asc
Description: This is a digitally signed message part.
__
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] [Rd] example package for devel newcomers

2011-08-02 Thread Alexandre Aguiar
Em Segunda 01 Agosto 2011, você escreveu:
 Is there a preferred language you would like to use in your package
 development? I randomly downloaded packages until I found some that
 helped me along my way, and might be able to help you pick one. If you
 are just looking at building a package of R functions and data you
 have developed, possibly the following example will get you started
 till you feel comfortable with the Writing R Extensions
 documentation (http://cran.r-project.org/doc/manuals/R-exts.pdf):

Dan, your message is cool. Well, here is what my project is about: it is a 
package to embed php into R. Named Rphp for now. It is mostly done from 
scratch. I have loved R-exts.pdf. Great stuff.

Why embed php into R? My primary purpose is to use web content management 
systems (WCMS) ready and extensively tested code from R cgi scripts. 
Someone more experienced with php might think of other uses. My approach 
is RAD(ical) and innovative (IMextremelyHO :-D) because:
a) *any* php based WCMS can be used from R code with no php or html 
coding;
b) output fully compliant with the website appearance;
c) WCMS automatic upgrades and interfaces changes (skins or themes) will 
be so unlikey to cause need for maintenance in R cgi scripts;
d) R cgi scripts will not demand changes in php code;
e) the builtin php session support obviates the need for any special 
session coding by R (likely non-web) programmers;
f) potential for improved analysis of web databases and even of systems 
surveillance tasks.

During my explorations of the R interface for extensions and the time 
spent in this tiny project, some questions emerged.

1. my code uses no recursion but I do not really know what is inside php 
code. Stack size could be a concern. Has any of you there ever needed to 
allocate a new stack for a package? Is it better to wait for complaints 
(if anyone ever would like to try this package...)?

2. can R_registerRoutines be called more than once within the same library 
(the same DllInfo data) so that it can reconfigure itself on the fly?

3. Is it safe (I guess it is) to re-export a function pointer retrieved 
with R_GetCCallable?

4. when loading a second library (in this case libphp5.so) is it better to 
put it in the package library directory and load it using the 'char 
*path' member of DllInfo? Using a second library has implications:
a) a given R setup can be limited to the user space without root access;
b) in the case of desktops where someone might use Rphp, most systems do 
not have libphp5.so installed by default and installing it frequently 
means to install apache and all (many) related packages;
c) many sysadmins do not have root access but can compile their own php 
version;
d) building the libphp5.so may not be an easy task for many.

5. Similar to 3, is it safe to export functions of the second library? 
libphp5.so will not be registered to R and has some interesting functions 
that can be exported directly or as pointers within Rphp library. A 
stub function can be used.

6. related to 4, with the many machine architectures and operating systems 
around I think it is neither desirable nor feasible to distribute 
precompiled libphp5.so versions; the package itself can download (wget 
and curl are everywhere) and compile php. Compiling php is not a lengthy 
task (6m12.9s in my quadcore desktop) but is a lot tricky and demands 
several development packages not installed by default in desktop systems. 
Their installations would require root access. What is the suggested 
approach to deploy libphp5.so?

7. I do not know how to produce a version for windows if requested. I have 
only an old MSC++ 97 and lcc (current) and have xp in a virtual box. This 
concern includes php. Can I get help regarding windows in this list? It 
might mean actual work: adapting code, compiling, packaging, etc. Not 
sure what is needed.

8. system safety does not seem a concern regarding this use of php, but... 
Any suggestions?

I guess some manual steps will be necessary because of potential security 
breaches related to the use of a second library. Patching php to produce 
a special build to be used as the package library would not be a trivial 
task and would demand updates at every new php version. Something I can't 
assure I can do. And would have to distribute the whole php source code: 
still have to study php licensing scheme. 

BTW, I copied Rdynpriv.h by hand to my include path to get access 
to 'struct _DllInfo' definition. The R install process did not copy this 
file. Am I doing something wrong here?

Sorry for the lengthy message. Thanx for your help.

-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT


signature.asc
Description: This is a digitally signed message part.
__
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, 

[R] example package for devel newcomers

2011-07-31 Thread Alexandre Aguiar
Hi,

I'd like to know whether there is a package (or more, of course) regarded 
as a good example that could be used also as an instructional tool for 
newcomers to R extensions development.

Thanks.

-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT


signature.asc
Description: This is a digitally signed message part.
__
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] example package for devel newcomers

2011-07-31 Thread Alexandre Aguiar
Em Domingo 31 Julho 2011, você escreveu:
 My memory is that this question gets asked every few months and one of
 the stock answers is to use the function 'package.skeleton' in the
 utils package as a starting point.

Got that from docs. And actually I already have most of the code written. 
My question addresses known tricks and impressions by experienced R 
interface programmers. This kind of stuff can be really useful. For 
instance, tricks are much better than docs when embedding php.

Thanx.


-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT


signature.asc
Description: This is a digitally signed message part.
__
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] error during DPpackage compilation

2009-03-31 Thread Alexandre Aguiar
Dear All,

I've had trouble compiling DPpackage as a user in one system. It works fine 
as root in other machines.
I can see any clues in error messages My guess is that it is a permissions 
matter.
Any help is appreciated.

OS: Linux
Kernel: 2.6.27 SMP
Arch: Intel 64 bits
gfortran not available

Thank you.


--8-

g77   -fpic  -g -O2 -c LDDPdensity.f -o LDDPdensity.o
LDDPdensity.f: In subroutine `lddpcdensity':
LDDPdensity.f:12: 
                                mcmc,nsave,seed,
                                      1
LDDPdensity.f:226: (continued):
         real*8 thetasave(nsave,p+p*(p+1)/2+3)
                          2
Invalid declaration of or reference to symbol `nsave' at (2) [initially seen 
at (1)]
LDDPdensity.f:12: 
                                mcmc,nsave,seed,
                                      1
LDDPdensity.f:236: (continued):
         integer mcmc(3),nburn,nskip,nsave,ndisplay
                                     2
Invalid declaration of or reference to symbol `nsave' at (2) [initially seen 
at (1)]
LDDPdensity.f:9: 
                                cpo,thetasave,randsave,
                                     1
LDDPdensity.f:291: (continued):
         open(unit=1,file='dppackage1.out',status='unknown',
         2
Invalid declaration of or reference to symbol `thetasave' at (2) [initially 
seen at (1)]
LDDPdensity.f:9: 
                                cpo,thetasave,randsave,
                                               1
LDDPdensity.f:291: (continued):
         open(unit=1,file='dppackage1.out',status='unknown',
         2
Invalid declaration of or reference to symbol `randsave' at (2) [initially 
seen at (1)]
LDDPdensity.f:15: 
                                xtx,xtx2,xty,xty2,fs,fm,worksam,workcpo)
                                                         1
LDDPdensity.f:291: (continued):
         open(unit=1,file='dppackage1.out',status='unknown',
         2
Invalid declaration of or reference to symbol `worksam' at (2) [initially 
seen at (1)]
LDDPdensity.f:430: 
            xty2=matmul(xtx2,mub)
            ^
Expression at (^) has incorrect data type or rank for its context
LDDPdensity.f:430: warning:
            xty2=matmul(xtx2,mub)
                 ^
Reference to unimplemented intrinsic `MATMUL' at (^) (assumed EXTERNAL)
LDDPdensity.f:430: 
            xty2=matmul(xtx2,mub)
                 ^
Invalid declaration of or reference to symbol `matmul' at (^) [initially 
seen at (^)]
LDDPdensity.f:458: 
               betam=matmul(xtx,xty)
               ^
Expression at (^) has incorrect data type or rank for its context
LDDPdensity.f:515: 
            xty=matmul(sbeta0i,m0)
            ^
Expression at (^) has incorrect data type or rank for its context
LDDPdensity.f:535: 
               xty=xty+matmul(xtx2,betawork)
               ^
Expression at (^) has incorrect data type or rank for its context
LDDPdensity.f:538: 
            betawork=matmul(xtx,xty)
            ^
Expression at (^) has incorrect data type or rank for its context
make: *** [LDDPdensity.o] Error 1
ERROR: compilation failed for package 'DPpackage'

--8-

Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-2501-1972 (SP) - New fax number! Please, update records.
--



signature.asc
Description: This is a digitally signed message part.
__
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] Upgrade through the R interface?

2009-03-31 Thread Alexandre Aguiar
Hi.

Em Terça 31 Março 2009, stephen sefick escreveu:
 I was just curious.

I use a bash script 
[http://asaguiar.med.br/modules.php?name=Downloadsd_op=getitlid=41] that 
checks for availability of upgrades and, if it is the case, downloads, 
compiles and install the newest R version. It could be run from within R. 
The exit values of interest are 100 (uptodate) and 0 (successful install). 
All other values are errors codes that correspond to the steps the script 
performs: system checks (1), download (2), decompression (3), configure (4), 
compilation (5), install (6).

The dowloadable version (url above) needs some minor configuration changes 
in variables.

Best wishes.


Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-2501-1972 (SP) - New fax number! Please, update records.
--



signature.asc
Description: This is a digitally signed message part.
__
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 version update utility

2009-02-07 Thread Alexandre Aguiar
Hi,

This is a resend because the attachment to the previous message was removed. 
Sorry.

I wrote a bash script that can either perform unattended upgrades of R as a 
cron job or by hand in a terminal. It has run in several environments and 
fits my purposes but I'd like to submit it to the community so it can be 
enhanced and widely useful.

Any help, suggestion, code, etc. are welcome.

If this stuff is regarded as off-topic, please, email me in private.

The script is at [http://asaguiar.med.br/arquivos/checkRupgrade].

Thanx in advance.

Best regards.

Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-2501-1972 (SP) - New fax number! Please, update records.
--


signature.asc
Description: This is a digitally signed message part.
__
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 version update utility

2009-02-04 Thread Alexandre Aguiar
Hi,

O wrote a small bash script that performs unattended upgrades of R.
It has fit my purposes but I'd like to submit it to the community so it can 
be enhanced and widely useful.

There is some redundancy in code and this will be addressed soon.

Almost every action is logged but the main action of each step is logged 
only in case of error. Each run will produce a different log file. It can 
be disk wasting for some. However, it has proved useful when several runs 
must be done.

Any help, suggestion, code, etc. are welcome.

If this stuff is regarded as off-topic, please, email me in private.

Best regards.


Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-2501-1972 (SP) - New fax number! Please, update records.
--


signature.asc
Description: This is a digitally signed message part.
__
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 computer heat

2008-10-07 Thread Alexandre Aguiar
Hi,

I noticed the temperature of my laptop rises sharply during execution of a 
long R script that generates several hundred plots, all of them saved to 
files. No screen output. Temps reached above 90 Celsius degrees in the box 
and above 80 C deg in the processor. The machine turns on cooler at maximum 
speed and exhaled air is really hot. Tried similar operations (batch 
graphic and music format conversion) and temp rises were usual.

System: laptop, Turion 64, Kubuntu Linux, Xorg X server 1.4.0.90, KDE 3.5.9, 
R 2.7.2 compiled with MBCS, PCRE, etc.

Could it be fake due to an interaction of some R piece with system monitors?

Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-5549-8760 (SP)
--


signature.asc
Description: This is a digitally signed message part.
__
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 computer heat

2008-10-07 Thread Alexandre Aguiar
Em Terça 07 Out 2008, Dr Eberhard Lisse escreveu:
 Why don't you hack a little script that looks at system load,
 temperature and date/time and writes it somewhere. Then

Done! Columns are time, % of cpu usage and cpu temp in Celsius degrees.
The R script used was complete in about 2 min 10 sec and the temp rose up to 
79 without cpu overload. I use *several* concurrent processes.

The shell script is below. I changed it to produce a seconds column and 
csv output.

The image attached was obtained in another run. Note that cpu_load (blue) 
was multiplied by 80 and never reached 80 (less than 1% during processing). 
The first peak was R loading.

Em Terça 07 Out 2008, Tom Backer Johnsen escreveu:
 My guess is that it the graphics card which is hard at work.

Maybe. But the script produces no screen output. All devices (grDevices) are 
files. Is video adaptor used in this setting? DVD play won't have any 
effect on temperature.

--8--
2008-10-07 18:28:38 :: 1.01 :: 48
2008-10-07 18:28:39 :: 1.01 :: 48
2008-10-07 18:28:40 :: 1.01 :: 48
2008-10-07 18:28:41 :: 1.00 :: 51
2008-10-07 18:28:42 :: 1.00 :: 51
2008-10-07 18:28:43 :: 1.00 :: 51
2008-10-07 18:28:44 :: 1.00 :: 51
2008-10-07 18:28:45 :: 1.00 :: 51
2008-10-07 18:28:46 :: 0.99 :: 49
2008-10-07 18:28:48 :: 0.99 :: 49
2008-10-07 18:28:49 :: 0.99 :: 49
2008-10-07 18:28:50 :: 0.99 :: 49
2008-10-07 18:28:51 :: 0.99 :: 48
2008-10-07 18:28:52 :: 0.99 :: 48
2008-10-07 18:28:53 :: 0.99 :: 48
2008-10-07 18:28:54 :: 0.99 :: 48
2008-10-07 18:28:55 :: 0.99 :: 48
2008-10-07 18:28:57 :: 0.98 :: 48
2008-10-07 18:28:58 :: 0.98 :: 48
2008-10-07 18:28:59 :: 0.98 :: 48
2008-10-07 18:29:00 :: 0.98 :: 48
2008-10-07 18:29:01 :: 0.98 :: 48
2008-10-07 18:29:02 :: 0.98 :: 48
2008-10-07 18:29:03 :: 0.98 :: 48
2008-10-07 18:29:05 :: 0.98 :: 48
2008-10-07 18:29:06 :: 0.98 :: 57
2008-10-07 18:29:07 :: 0.98 :: 57
2008-10-07 18:29:08 :: 0.98 :: 57
2008-10-07 18:29:09 :: 0.98 :: 57
2008-10-07 18:29:10 :: 0.98 :: 57
2008-10-07 18:29:11 :: 0.99 :: 60
2008-10-07 18:29:12 :: 0.99 :: 60
2008-10-07 18:29:13 :: 0.99 :: 60
2008-10-07 18:29:15 :: 0.99 :: 60
2008-10-07 18:29:16 :: 0.99 :: 60
2008-10-07 18:29:17 :: 0.99 :: 62
2008-10-07 18:29:18 :: 0.99 :: 62
2008-10-07 18:29:19 :: 0.99 :: 62
2008-10-07 18:29:20 :: 0.99 :: 62
2008-10-07 18:29:21 :: 1.00 :: 64
2008-10-07 18:29:22 :: 1.00 :: 64
2008-10-07 18:29:23 :: 1.00 :: 64
2008-10-07 18:29:25 :: 1.00 :: 64
2008-10-07 18:29:26 :: 1.00 :: 64
2008-10-07 18:29:27 :: 1.00 :: 65
2008-10-07 18:29:28 :: 1.00 :: 65
2008-10-07 18:29:29 :: 1.00 :: 65
2008-10-07 18:29:30 :: 1.00 :: 65
2008-10-07 18:29:31 :: 1.00 :: 67
2008-10-07 18:29:32 :: 1.00 :: 67
2008-10-07 18:29:33 :: 1.00 :: 67
2008-10-07 18:29:35 :: 1.00 :: 67
2008-10-07 18:29:36 :: 1.00 :: 67
2008-10-07 18:29:37 :: 1.00 :: 68
2008-10-07 18:29:38 :: 1.00 :: 68
2008-10-07 18:29:39 :: 1.00 :: 68
2008-10-07 18:29:40 :: 1.00 :: 68
2008-10-07 18:29:41 :: 1.03 :: 69
2008-10-07 18:29:42 :: 1.03 :: 69
2008-10-07 18:29:43 :: 1.03 :: 69
2008-10-07 18:29:45 :: 1.03 :: 69
2008-10-07 18:29:46 :: 1.04 :: 69
2008-10-07 18:29:47 :: 1.04 :: 70
2008-10-07 18:29:48 :: 1.04 :: 70
2008-10-07 18:29:49 :: 1.04 :: 70
2008-10-07 18:29:50 :: 1.04 :: 70
2008-10-07 18:29:51 :: 1.04 :: 71
2008-10-07 18:29:52 :: 1.04 :: 71
2008-10-07 18:29:54 :: 1.04 :: 71
2008-10-07 18:29:55 :: 1.04 :: 71
2008-10-07 18:29:56 :: 1.04 :: 71
2008-10-07 18:29:57 :: 1.04 :: 72
2008-10-07 18:29:58 :: 1.04 :: 72
2008-10-07 18:29:59 :: 1.04 :: 72
2008-10-07 18:30:00 :: 1.04 :: 72
2008-10-07 18:30:01 :: 1.04 :: 73
2008-10-07 18:30:02 :: 1.04 :: 73
2008-10-07 18:30:03 :: 1.04 :: 73
2008-10-07 18:30:05 :: 1.04 :: 73
2008-10-07 18:30:06 :: 1.04 :: 73
2008-10-07 18:30:07 :: 1.04 :: 74
2008-10-07 18:30:08 :: 1.04 :: 74
2008-10-07 18:30:09 :: 1.04 :: 74
2008-10-07 18:30:10 :: 1.04 :: 74
2008-10-07 18:30:11 :: 1.03 :: 74
2008-10-07 18:30:12 :: 1.03 :: 74
2008-10-07 18:30:13 :: 1.03 :: 74
2008-10-07 18:30:15 :: 1.03 :: 74
2008-10-07 18:30:16 :: 1.04 :: 74
2008-10-07 18:30:17 :: 1.04 :: 75
2008-10-07 18:30:18 :: 1.04 :: 75
2008-10-07 18:30:19 :: 1.04 :: 75
2008-10-07 18:30:20 :: 1.04 :: 75
2008-10-07 18:30:21 :: 1.04 :: 75
2008-10-07 18:30:22 :: 1.04 :: 75
2008-10-07 18:30:23 :: 1.04 :: 75
2008-10-07 18:30:25 :: 1.04 :: 75
2008-10-07 18:30:26 :: 1.04 :: 75
2008-10-07 18:30:27 :: 1.04 :: 76
2008-10-07 18:30:28 :: 1.04 :: 76
2008-10-07 18:30:29 :: 1.04 :: 76
2008-10-07 18:30:30 :: 1.04 :: 76
2008-10-07 18:30:31 :: 1.04 :: 76
2008-10-07 18:30:32 :: 1.04 :: 76
2008-10-07 18:30:33 :: 1.04 :: 76
2008-10-07 18:30:35 :: 1.04 :: 76
2008-10-07 18:30:36 :: 1.05 :: 76
2008-10-07 18:30:37 :: 1.05 :: 76
2008-10-07 18:30:38 :: 1.05 :: 76
2008-10-07 18:30:39 :: 1.05 :: 76
2008-10-07 18:30:40 :: 1.05 :: 76
2008-10-07 18:30:41 :: 1.05 :: 76
2008-10-07 18:30:43 :: 1.05 :: 76
2008-10-07 18:30:44 :: 1.05 :: 76
2008-10-07 18:30:45 :: 1.05 :: 76
2008-10-07 18:30:46 :: 1.05 :: 76
2008-10-07 18:30:47 :: 1.05 :: 77
2008-10-07 18:30:48 :: 1.05 :: 77

[R] damaged text output of legend() and plot()

2008-09-23 Thread Alexandre Aguiar
Hi,

System: laptop, Turion 64, Kubuntu Linux, Xorg X server 1.4.0.90, KDE 3.5.9, 
R 2.7.2 compiled with default settings.

I recently changed my laptop setup to get better font rendering in the LCD 
monitor. Some subpixel stuff that limits quality of bitmaped fonts.

When generating jpegs with R the text output of legend() looks blurred. This  
affects both legend() and plot() in pngs. Attached 2 samples. I used 
family=sans. The same script produces normal output in my desktop where 
the monitor is a CRT. Funtion text() seems normal.

Is there a workaround for that?

Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-5549-8760 (SP)
--
attachment: png.png

signature.asc
Description: This is a digitally signed message part.
__
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 as shelll script

2008-05-27 Thread Alexandre Aguiar
Hi,

I have devised some applications of R as a scripting shell language and 
started using it flawlessly a few months ago.

Never minded publishing it because it looked so obvious. However, a search 
in the archives revealed there is no recent easy-to-use method proposed. 
The latest reference I found is from 2006 
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/81124.html) and even a c 
wrapper has been proposed 
(http://kavaro.fi/mediawiki/index.php/Using_R_from_the_shell).

So, here it goes an exceedingly simple example of my simple solution that 
works pretty well:

#!/usr/local/bin/Rscript --vanilla
update.packages(ask=F, repos=http://cran.spsconsultoria.com;)
# no need for calls to quit()

Now just chmod this properly (at least 700 is advisable) and you have an 
executable that can be run directly from the command line.

The --vanilla option is important to avoid dissemination of .History 
and .Rdata files in the system. But one can replace for another set of 
options to allow the load of .Rprofile, for instance (by 
using --no-save  --no-restore  --no-site-file --no-environ instead).

This has worked to me under several flavors of Linux and R since 2.2 or 2.4, 
not sure, do not remember (it must be that german guy the doctor said I 
can't remove from my mind :-).

Thanx for the existance of this list.

Alexandre

-- 
Alexandre Santos Aguiar, MD, SCT
--
website: http://spsconsultoria.com/
Phone: +55-11-3717-4866 (SP)
Phone: +55-21-3717-4866 (RJ)
Voicemail: +55-11-2157-6891 (SP)
Fax: +55-11-5549-8760 (SP)
--

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