[R] Bug in list.files(full.names=T)

2021-12-19 Thread Mario Reutter
nd with a path separator. My question would now be if this warrants a bug report? And if you agree, could someone issue the report since I'm not a member on Bugzilla? Thank you and best regards, Mario Reutter [[alternative HTML version deleted]] ___

[R] Fitting survival trees with competing risk

2018-04-25 Thread Mario Petretta
any R package for this fit? Thank you very much in advance. Mario Petretta ---- Mario Petretta, MD, FAHA Professor of Internal Medicine Department of Translational Medical Sciences Naples University "F

[R] R: forest plot metafor

2015-12-14 Thread Mario Petretta
Many tanks to Wolfgang Viechtbauer for his time and help. The suggested code works very well Mario Petretta. __ Message: 11 Date: Sat, 12 Dec 2015 17:22:20 +0100 From: "Viechtbauer Wolfgang (STAT)"

[R] R: forest plot metafor

2015-12-12 Thread Mario Petretta
frame. However, I again ask: Using: forest(res, showweights=TRUE) it is possible to directly order the columns, simply placing the weights after effect size and CI? Sincerely Mario Petretta -Messaggio originale- Da: Michael Dewey [mailto:li...@dewey.myzen.co.uk] Inviato: venerdì

Re: [R] Weird behaviour function args in ellipses

2015-12-11 Thread Mario José Marques-Azevedo
t expected this behaviour (again my fault). I read others aspects of manual, but this that I supposed to know (my fault). But ok, we learn with our faults. And this is good! Hadley, thank you for options! Best regards, Mario On 11 Dec 2015 18:30, "Hadley Wickham" wrote: > On Fri, D

Re: [R] Weird behaviour function args in ellipses

2015-12-11 Thread Mario José Marques-Azevedo
tion to disable partial match, but it seems that is not possible. Program with hacks for this will be sad. Best regards! Mario On 11 December 2015 at 15:55, David Winsemius wrote: > > > On Dec 11, 2015, at 9:40 AM, Mario José Marques-Azevedo < > mariojm...@gmail.com> wrote: &g

[R] Weird behaviour function args in ellipses

2015-12-11 Thread Mario José Marques-Azevedo
- list(...) cat("col.range =", col.range, "\n") cat("dots =\n") print(dots) } fn2(1, b=2, col="red") # Output col.range = black dots = $col [1] "red" It works! I'm using R version 3.2.2. Best regards! Mario [[alternative HTML vers

[R] forest plot metafor

2015-12-09 Thread Mario Petretta
le: data.bcg)? Thanks for your attention Mario Petretta Professor of Internal Medicine Department of Translational Medical Science Naples University “Federico II” - Italy _ <http://www.avast.com/> Questa e-mail è priva di virus e malware perché è

[R] R: help with metasens

2015-08-13 Thread Mario Petretta
Obviously metafor and not metaphor. Sorry Mario [[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

[R] R: help with metasens

2015-08-13 Thread Mario Petretta
Many thanks for your suggestion. I will try a new database search and the hc metaphor function. Mario PS: what is diagonal bacn? -Messaggio originale- Da: Michael Dewey [mailto:li...@dewey.myzen.co.uk] Inviato: mercoledì 12 agosto 2015 18.19 A: petre...@unina.it; r-help@r-project.org

Re: [R] Contrast anova multi factor

2015-04-26 Thread Mario José Marques-Azevedo
185 0.0154 * f1b 0.4651 0.3720 1.251 0.2513 f2II -1.2658 0.3720 -3.403 0.0114 * I do not know what is Intercept value in this case. I expected that it is mean of level "a" of f1 and level "I" of f2, but not. Best regards, Mario On 26 Ap

[R] Contrast anova multi factor

2015-04-26 Thread Mario José Marques-Azevedo
r not interaction term, but he explain that Intercept is mean of first level of the factors. Best regards, Mario ..... Mario José Marques-Azevedo Ph.D. Candidate in Ecology Dept. Plant Biology, Institute of Biology University of Cam

Re: [R] Comparing summary hazard ratios in meta-analysis

2014-11-23 Thread Mario Petretta
Many thanks again for your suggestions. Sorry. Effectvely there was a mistake in the HR I previously submitted. As suggested, I started from scratch and the correct HR are: HR 3,12 (2,24-4.35) HR 1,25 (1,03-1,52) Mario On 23/11/2014 09:23, Viechtbauer Wolfgang (STAT) wrote

[R] R: Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Mario Petretta
them in a single data frame and thereafter performing the meta-regression incorporating the moderator. Mario -Messaggio originale- Da: Viechtbauer Wolfgang (STAT) [mailto:wolfgang.viechtba...@maastrichtuniversity.nl] Inviato: venerdì 21 novembre 2014 15:37 A: Michael Dewey; Mario

[R] Comparing summary hazard ratios in meta-analysis

2014-11-21 Thread Mario Petretta
: HR 1.25 (95% CI 1.03 - 2.6) It is possible or I'm comparing apples with oranges? Any suggestion is welcome. --- Mario Petretta Associate Professor of Internal Medicine Department of Translational Medical Sciences Naples University Federi

[R] 3D scatterplot and agreement among three methods in the same subject

2014-10-31 Thread Mario Petretta
ed in this example. Any suggestion is welcome. --- Mario Petretta Associate Professor of Internal Medicine Department of Translational Medical Sciences Naples University Federico II Italy __ R-help@r-p

[R] R: interpreting weight in meta-analysis of proportion

2014-04-19 Thread Mario Petretta
Fine ! Many many thanks! Mario -Messaggio originale- Da: Bernd Weiss [mailto:bernd.we...@uni-koeln.de] Inviato: venerdì 18 aprile 2014 15.58 A: petre...@unina.it; R-help@r-project.org Oggetto: Re: [R] interpreting weight in meta-analysis of proportion On 18.04.2014 13:02, petre

[R] merge two forest plot in one graph with meta package

2014-02-16 Thread Mario Petretta
metaCMD, fontsize=12, squaresize=0.6, just.studlab="left", leftcols="studlab", rightcols="effect") but it do not works Thanks for your attention Mario Petretta Department of Translational Medical Science Naples University "

[R] Remove from the mailing list

2013-11-06 Thread Mario Garrido
Dear administrators, I tried to stop receving mails from your webpage to my current mail ( gaiarr...@usal.es). I try to do it through your webpage but i was not able. I would appreciate to be removed from the mailing list. Thanks in advance. -- Mario Garrido Escudero Dpto. de Biología Animal

[R] out of the mailing list

2013-05-17 Thread Mario Garrido
Hello, I want to stop receiveng mails from R help forum, thanks. This is my data : Mario Garrido Escudero Dpto. de Biología Animal, Ecología, Parasitología, Edafología y Qca. Agrícola Fac. de Farmacia Campus Unamuno Universidad de Salamanca gaiarr...@usal.es [[alternative HTML version

Re: [R] Postscript files graphic quality and other problems

2013-04-14 Thread Mario José
ry on LyX too and is ok. The problem is in Word/OpenOffice. Thank you and excuse me again. Best regards, Mario On 14/04/2013 15:00, Duncan Murdoch wrote: > On 13-04-14 1:11 PM, Mario José wrote: >> Hi all, >> >> I try to save graphic as eps file, but I have probles with qual

[R] Postscript files graphic quality and other problems

2013-04-14 Thread Mario José
howed. Best regards, Mario __ 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] building a regression model

2013-01-05 Thread Mario Bourgoin
27;' on right-hand side explain why the result of add1 did not have an ``A'' row? Best, Mario On Fri, Jan 4, 2013 at 6:53 PM, dada wrote: > Hi > > I am trying to build a regression model. My data looks like this: > > A B C D E &

Re: [R] Need help on dataframe

2013-01-05 Thread Mario Bourgoin
2 V3 V4 1 6.5 6.75 7.33 3.75 2.17 2 18.5 6.75 6.916667 4.33 4.00 3 30.5 6.75 7.33 3.75 2.17 Best, Mario On Sat, Jan 5, 2013 at 8:33 AM, Simonas Kecorius wrote: > Dear R users, I came up to a problem by taking means (or other summary > statistics)

Re: [R] How to plot multiple time series with different time base in same plot?

2013-01-04 Thread Mario Bourgoin
Hi Matthijs, Look at the code in the attached file and try it out. Best, Mario On Fri, Jan 4, 2013 at 5:53 PM, Matthijs Daelman wrote: > Hi > > I have to time series with a different time base. > > The first has only sporadic datapoints: > 2011-02-01 15.29130 > 2011-02-

Re: [R] Iterative loop using "repeat"

2013-01-04 Thread Mario Bourgoin
our function, will never terminate. Otherwise, your code fragment is opaque, and unless you tell me something you have not stated in your email, I cannot help you. I'm sorry. Best, Mario On Fri, Jan 4, 2013 at 6:13 AM, mary wrote: > Hi, > I'm Marianna > I'm trying to apply

[R] Version Controlled CRAN Packages

2013-01-03 Thread Mario Bourgoin
t I find examples of groups creating and maintaining local source repositories for R and its packages? Sincerely, -- Mario Bourgoin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] Effective degrees of freedom

2012-11-13 Thread Mario A. Pardo
imated for more complex regressions, but I was not able to find detailed information about it. Does any one of you know if I have to estimate those effective degrees of freedom for a simple Pearson correlation test? Thank you very much in advance, -- -mario

[R] Displaying percentages within bars

2012-01-30 Thread Mario Giesel
='fill')   Is it possible to place percentages within each field of the bars? So, for instance, the dark blue field of color = "D" would contain a number of about 42.0%. A second question is how to change the size of this number.   Any comments are welcome! Mario [[altern

Re: [R] ColorBrewer question

2012-01-30 Thread Mario Giesel
It works! Thanks a lot for your explanations, Michael.   Good luck,  Mario Von: R. Michael Weylandt Cc: "r-help@r-project.org" Gesendet: 5:22 Montag, 30.Januar 2012 Betreff: Re: [R] ColorBrewer question I believe you need to use the scale_fill_br

Re: [R] Horizontal stacked 100% bars with ggplot2

2012-01-29 Thread Mario Giesel
Thanks, Carlos,    your solution looks nice, however, there are 4 bars instead of 2 i.e. bars are not stacked. Meanwhile I got a solution for that task. So thanks for sharing your version of it!   Good luck,  Mario Von: Carlos Ortega Cc: "r-help@r-projec

[R] ColorBrewer question

2012-01-29 Thread Mario Giesel
seq", pal = "Blues")" with no effect. This is my code:   p <- ggplot(data, aes(x = gender))  + scale_y_continuous("",formatter="percent") + xlab("Gender") + coord_flip() +      scale_colour_brewer(type="seq", pal = "Blues

[R] Horizontal stacked 100% bars with ggplot2

2012-01-27 Thread Mario Giesel
og vs. cat) so that % dogs + % cats are stacked in 1 bar and sum up to 100% (for each gender group 1 bar). How can this be done with ggplot2? Thanks for any comments! Mario [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] pretty(range(data$z),10) Error

2012-01-17 Thread Mario Giesel
6 6 L 3 1 2 2 1 3 3 1 3 4 4 ... About 1.800 cases (more than 100 per segment). Did anybody experience similar problems?   Thanks for all comments,  Mario [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

[R] Reply on "ggplot2 - tricky problem"

2012-01-06 Thread Mario Giesel
That comes really close to what I had in mind. Thanks a lot for helping out, Justin! Good luck,  Mario Re: [R] ggplot2 - tricky problem how bout: dat<-data.frame(id=1:4,city=c('berlin','munich'),likeability=c(5,4,6,5),uniqueness=c(3,4,4,4))

[R] ggplot2 - tricky problem

2012-01-05 Thread Mario Giesel
es in uniqueness on second plot) d) Drawing a line through mean points on each plot Hope I could explain it understandably. Any help is appreciated! Thanks a lot,  Mario [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Filling a variable with unmentioned categories

2011-11-18 Thread Mario Giesel
is 0,00 - 0,19. Some prices are missing, e.g. 0,01 .   b) Supplemented data: price mentioned 0,00 1 0,00 1 0,01 0 0,02 1 0,03 1 0,03 1 0,04 1 0,05 0 0,06 0 0,07 0 0,08 0 0,09 0 0,10 1 0,11 0 0,12 0 0,13 0 0,14 0 0,15 0 0,16 1 0,17 0 0,18 0 0,19 1 0,19 1 0,20 0   Any ideas are welcome. Thanks a lot,

Re: [R] Numerical Format on axis

2011-11-17 Thread Mario Giesel
Thoiusand thanks to David and Don. Great help!   Mario Aachen, Germany Von: "MacQueen, Don" Cc: "r-help@r-project.org" ; David Winsemius Gesendet: 2:30 Donnerstag, 17.November 2011 Betreff: Re: [R] Numerical Format on axis To add to what

[R] Numerical Format on axis

2011-11-16 Thread Mario Giesel
Hello, list,    I'm new to R and I'm trying to produce a chart with currency values on the y axis. Values should be e.g. 1,00, 1,50, 2,00, etc. In fact they are 1,0, 1,5, 2,0, etc. How do I get R to show two digits after the comma on that axis?   Thanks for any help,  Mario [[a

Re: [R] Error with Source()

2011-11-13 Thread Mario Valle
Normally is a missing comma in a function command list. Ciao! mario On 10-Nov-11 19:02, jim holtman wrote: You have a syntax error in your script. Take a look around line 884 On Thu, Nov 10, 2011 at 9:27 AM, ftonini wrote: Hi everybody, I started to receive a weird message

Re: [R] Win upgrade pb (virus)

2011-11-12 Thread Mario Valle
protection. Voilà, no more problems. Thanks again! mario On 11-Nov-11 11:34, Mario Valle wrote: I just upgraded my Win7 32bits installation to 2.14.0 after deinstalling 2.12.x First thing I moved the win-library from 2.12 to 2.14 and executed a update.packages(ask='graphi

[R] Win upgrade pb (virus)

2011-11-11 Thread Mario Valle
I had to remove the colorspace and ggplot2 packages. Is it a known problem? What else can I do (except removing the above packages or changing antivirus)? Thanks! mario -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~m

[R] structural equation modelling with binary response

2011-10-18 Thread Mario Beolco
Dear R users, Apologies for the total beginner's question. I was wondering whether you could tell me if there is a structural equation modelling function that can handle binary data i.e. in similar manner to the GLM function with a binomial family. Best wishes,

Re: [R] How to add a double quote to a string

2011-10-11 Thread Mario Valle
\"",tab,"\"", sep="") or query = paste('DROP TABLE IF EXISTS "',tab,'"', sep="") and tab="abc". no need for c() Ciao! mario Please help me to solve this problem -- View th

Re: [R] For loop for subset - repeating same over and over?

2011-09-29 Thread Mario Valle
Not reproducible. Could you please attach the dataset QInflAvgbyPlot Otherwise I don't see anything obviously wrong here. Ciao! mario On 30-Sep-11 01:37, kelseyann wrote: SiteSpp<- c("ADHALP","ADLCON","ADLARC","

Re: [R] trouble with library(FEAR) and libgfortran.so.1

2011-09-24 Thread Mario Valle
mario On 25-Sep-11 08:21, John P. Burkett wrote: Running R version 2.13.1 under Ubuntu 10.10 (kernel version 2.6.35-30-generic) on a x86-64 laptop with gfortran 4.4, I'm trying to install and use the FEAR package from http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.ht

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
Paul I tested your suggestion of use the BIGLM package. With this package, model run with out any problem. regards 2011/9/22 David Winsemius > > On Sep 22, 2011, at 5:00 PM, Mario Montecinos Carvajal wrote: > > Michale and Paul >> >> Thanks for your quick respo

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
aybe this is incorrect, maybe the syntax correct is that suggest for you (lm(length~ (as.factor(age) + as.factor(year) + as.factor(sex) +soi + k)^2), I will tray with this and after tell you. As data my workspace have 2.5 GB of memory. Regards David 2011/9/22 David Winsemius > > On Sep 2

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
to see. > > > > Michael > > ...in addition, how large is your dataset? Please provide us with a self > contained example which reproduces this problem. You could take a look > at the biglm package. > > regards, > Paul > > > On Sep 21, 2011, at 10:41 PM,

[R] Error: cannot allocate vector of size xxx

2011-09-21 Thread Mario Montecinos Carvajal
d. I've been thinking in change the OS, but this is may last option. Regards I read -- Mario Montecinos C. Biologo Marino Dr (c) en Ciencias Universidad Austral de Chile Los acentos han sido omitidos voluntariamente para evitar incompatibilidades Evite enviar cartas impresas, cuidemos e

Re: [R] Unexpected behavior from which.max (or possibly max)

2011-09-15 Thread Mario Valle
If I enclose x$i+x$window in parentheses it works: check.max<- function(x){obs.max<- which.max(x$elev[x$i:(x$i+x$window)]); obs.max} x$elev[x$i:x$i+x$window] means: x$elev[(x$i:x$i)+x$window] Simple. mario check.max(test) [1] 11 What am I missing? Here is sessionI

Re: [R] writeLines + foreach/doMC

2011-07-04 Thread Mario Valle
Read something about parallel processing and how I/O should be done by a single process. Suggestion: write a different file from each thread then combine the results with cat or similar. Hope it helps mario On 04-Jul-11 11:58, Ramzi TEMANNI wrote: Hi I&#

[R] RMySQL, RODBC, dbReadTable and ISO-8859-1 (Spanish data)

2011-07-01 Thread Mario Martínez
): op <- options() op$encoding <- "iso-8859-1" options(op) but now in ubuntu it did not work. I am working in ubuntu 10.04 and R 2.10.1. I hope somebody could help me to figure it out. Thanks, Mario Martínez A. [[alternative HTML

[R] Can I disable Cairo?

2011-06-20 Thread Mario Valle
that are forced to load and use CairoDevice if they wants better quality. I want to avoid this, is it possible? Thanks! mario -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS

Re: [R] EM vs Bayesian

2011-04-29 Thread Mario Valle
Maybe it is better to ask this question on: http://stats.stackexchange.com/ The question is not R specific. mario On 24-Apr-11 16:16, Jim Silverton wrote: Hello, Is there any literature there that says that the EM is better/worse than a

Re: [R] Location of libraries in Windows

2011-04-18 Thread Mario Valle
! mario On 18-Apr-11 09:22, Mario Valle wrote: I'm preparing to install 2.13, so I need a clarification about package location on disk. On window the packages I have installed are under C:\Users\mvalle\R\win-library\2.12 and the ones that come with R are under "

[R] Location of libraries in Windows

2011-04-18 Thread Mario Valle
ld ask if moving all directories (except maybe base) from R\library to R\win-library\2.12 could be a "good thing to do". Or should I simply not update packages that come with R? Thanks for your help! mario -- Ing. Mario Valle Data An

Re: [R] Krylov subspace computations of matrix exponentials

2011-04-14 Thread Mario Valle
Look at ExpoKit (http://www.maths.uq.edu.au/expokit/) It implement Krylov methods and is really fast. Unfortunately no R wrapper that I know yet. If you plan to implement it, I can provide my testing code. Ciao! mario On 14-Apr-11 10:16, Niels Richard Hansen wrote: I use

Re: [R] Non linear Regression: "singular gradient matrix at initial parameter estimates"

2011-04-12 Thread Mario Valle
p1p2p4 199.48276 16.28664 -0.01987 residual sum-of-squares: 560.6 Number of iterations to convergence: 5 Achieved convergence tolerance: 5.637e-07 Ciao! mario On 12-Apr-11 18:01, Felix Nensa wrote: fit = nls(yeps ~ p1 / (1 + exp(p2 - x)) * exp(

Re: [R] Optimzing a nested function

2011-04-12 Thread Mario Valle
P.S.: It is bad taste to call a variable 'sum' because it is a R function. Ciao! mario On 12-Apr-11 08:33, vioravis wrote: I am trying to optimize a nested function using nlminb. This throws out an error that y is missing. Can someone help me with the correct synt

Re: [R] Very simple question

2011-04-08 Thread Mario Valle
paste(teste, collapse="+") ciao! mario On 08-Apr-11 12:44, Ronaldo Reis Junior wrote: teste <- c("A","B","C") -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~mvalle Swiss National Superc

[R] Rotation Forest in R

2011-04-07 Thread Mario Beolco
Dear R users, I was wondering whether you could tell me if there are any R functions or packages that can implement Rotation Forest (not Random Forests) algorithm: http://www.computer.org/portal/web/csdl/doi/10.1109/TPAMI.2006.211 thanks in advance, Mario

Re: [R] hc2Newick is different than th hclust dendrogram

2011-04-04 Thread Mario Valle
e.: z <- scan('data.Rdata') C <- matrix(z, 112, 112, byrow=TRUE) - add to your problem description all the packages you loaded to make the example work, i.e.: library('ctc') Hope it helps mario On 04-Apr-11 21:47, Jose Hleap Loz

Re: [R] Plotting MDS (multidimensional scaling)

2011-04-02 Thread Mario Valle
Also try the asp parameter in plot. plot(fit2$points, xlab="Coordinate 1", ylab="Coordinate 2",main="Metric MDS",type='n',asp=1) text(fit2$points, labels = c('A','B','C','D'), cex=1) Hope it helps

[R] How to put line linking two plots

2011-03-30 Thread Mario Valle
manually using Inkscape on the resulting pdf file. Is it possible to add it inside R? Should I switch to other charting packages? Thanks for the advice! mario set.seed(123) pdf("test.pdf", width=14, height=7) layout(matrix(c(1,1,2,3), 2, 2, by

Re: [R] Removing Bad Data

2011-03-16 Thread Mario Valle
To recover also the date: x<- read.table('d.dat', na.strings='-') x$V1<- as.Date(x$V1, "%m/%d/%Y") Hope it helps mario On 16-Mar-11 06:45, Rahul Kaura wrote: I created a couple of timeSeries objects - when I was merging th

Re: [R] Removing Bad Data

2011-03-16 Thread Mario Valle
062 -0.0138 -0.0173 -0.0065 09/30/2007 0.0197 0.0477 0.0410 0.0331 0.0114 0.0322 -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v. Cantonale

Re: [R] sprintf does not print

2011-02-16 Thread Mario Valle
Use cat(sprintf('I did the the %d,%d \n',k,l)) The functions do not print in non interactive mode Hope it helps mario On 16-Feb-11 11:15, Alaios wrote: Dear all I have an sprintf inside a loop to track changes in variable's value. This sprintf sta

Re: [R] txtProgressBar examples?

2011-02-15 Thread Mario Valle
ux. Ciao! mario On 15-Feb-11 13:41, Laurent Gatto wrote: 'R: Monitoring the function progress with a progress bar' [1] might b helpful. Laurent [1] http://ryouready.wordpress.com/2009/03/16/r-monitor-function-progress-with-a-progress-bar/ On 14 February 2011 18:32, Scott

[R] problem barplot width

2011-02-04 Thread Mario Beolco
eate barplot barplot(d,col=barcol,ylim=c(min(d-s*1.25),max(d+s*1.25)),space=0.1) thanks in advance for your help Best wishes, Mario __ 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] plot with 2 y axes

2011-01-25 Thread Mario Beolco
improve the above code or on how I could use other packages to create the plot I want. thanks! Mario "year","Temperature","Index" 1966,2.9,1 1967,4.5,1.24 1968,1.9,1.46 1969,1,1.37 1970,2.9,1.87 1971,4.3,2.66 1972,3.9,3.07 1973,4.3,3.91 1974,4.9,4.16 1975

[R] Fwd: Re: [R-sig-hpc] Working doSNOW foreach openMPI example

2011-01-13 Thread Mario Valle
Whas missing the R in the command line: "mpirun -n --hostfile /home/hostfile R --no-save -f rtest.R" Hope this helps mario On 13-Jan-11 22:08, Justin Moriarty wrote: Hi, Just wanted to share a working example of doSNOW and foreach for an openMP

Re: [R] Grid drawing over the filled.contour's legend

2011-01-13 Thread Mario Valle
Add the following lines before grid: # insert 3 lines of code, stolen from filled.contour(): mar.orig <- par("mar") w <- (3 + mar.orig[2]) * par("csi") * 2.54 layout(matrix(c(2, 1), nc = 2), widths = c(1, lcm(w))) Taken from thil list somewhere. Ciao!

Re: [R] [R-sig-hpc] Error in makeMPIcluster(spec, ...): how to get a minimal example for parallel computing with doSNOW to run?

2010-12-16 Thread Mario Valle
Shouldn't -n be 4 in the bsub command? One master+3 slaves. This was required for snowfall, but I think doSNOW is similar. Hope it helps mario On 16-Dec-10 23:09, Marius Hofert wrote: Dear expeRts, I try to get a minimal example for parallel comp

Re: [R] Is there a way to have 'comment' keep a list?

2010-11-09 Thread Mario Valle
Look at the help page, the example does exactly this by putting a two element vector of strings as comment. Hope it helps mario On 09-Nov-10 11:36, Tal Galili wrote: Hello all, I recently discovered the "comment" command. I see it can only hold a

[R] FYI: The First Cloud Portal to “R”

2010-10-27 Thread Mario Valle
html Enjoy! mario -- Ing. Mario Valle Data Analysis and Visualization Group| http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91)

Re: [R] Artifacts in filled.contour+pdf

2010-10-26 Thread Mario Valle
Thanks Baptiste! the problem with lattice (or more likely with my ignorance) is that it does not accept NA values. Ciao! mario On 26-Oct-10 07:38, baptiste auguie wrote: Hi, As an alternative, maybe you could use lattice::panel.levelplot.raster which I think doesn't

Re: [R] Artifacts in filled.contour+pdf

2010-10-26 Thread Mario Valle
. mario On 26-Oct-10 02:30, David Winsemius wrote: On Oct 25, 2010, at 6:50 AM, Mario Valle wrote: Dear all, I'm using R 2.12.0 on Windows 7 (32bits) I created a filled contour from the attached data using the following code: load('bug.R

Re: [R] the function doesn´t work

2010-09-26 Thread Mario Valle
(starting with #) to your code. Reading error messages is always useful too. Best mario On 26-Sep-10 09:28, jethi wrote: hi, sorry but i can´t remove the problem.but i change the programm a little bit. i didn´t work with r programm before, so its really hard for me to find my

Re: [R] the function doesn´t work

2010-09-26 Thread Mario Valle
The message is clear. Just resove this problem before posting a terribly general and so not useful "it does not work". Best mario > f=outer(p,m,Vectorize(power)) Error in outer(p, m, Vectorize(power)) : object 'p' not found > persp(p,m,power,t

Re: [R] help me understand how things work.

2010-09-16 Thread Mario Valle
print(k) and you see a lower triangular distance matrix. k[1] selects distances between 1 and 2 k[2] selects distances between 1 and 3 and so on. you have a distance matrix, not a single distance value, so you have to select which distance you need. Ciao! mario On 16-Sep

Re: [R] LOOping problem with R

2010-08-29 Thread Mario Valle
When j==1 for loops from i down to zero. 5:0 is valid and means c(5,4,3,2,1,0) Hope it helps mario Nam Lethanh wrote: > Dear Guys, > > I do converting codes from Fortran into R and got stuck in solving LOOPING > procedure with R. In FORTRAN, it is (DO and

[R] FYI: matrix surprise

2010-07-13 Thread Mario Valle
Some time ago someone asked for things that make R difficult to master. Here I want to record one R behavior that took me off-guard yesterday. Moral of the story: vectorialize, but don't exaggerate. Hope it helps mario ### A very simple data fra

Re: [R] Parallel computing on Windows (foreach)

2010-06-16 Thread Mario Valle
R --slave -f your-script.r Hope it helps mario I looked at doMC and doRedis, but these do not run on Windows, as far as I understand. And doSNOW is something to use when you have a cluster, while I have a simple dual-core PC. It is not really clear for how to make parallel comp

Re: [R] drawing curve

2010-06-10 Thread Mario Valle
x<-c(1:6) y<-c(.01,.09,.08,.03,.001,.02) plot(x,y, type='l') Please try ?plot before asking to the list. Ciao! mario On 10-Jun-10 12:11, suman dhara wrote: Sir, I have a problem regarding drawing curve.I pose the problem as follows: suppose I have two vectors

Re: [R] Merge usage to update data.frame

2010-06-06 Thread Mario Valle
That is! Match, not merge is the solution. Ahhh, memory, memory... Thanks a lot! mario On 07-Jun-10 0:09, jim holtman wrote: try this: a V1 V2 1 AAA 1 2 BBB 2 3 CCC 3 u V1 V2 1 BBB 22 a$V2[match(u$V1, a$V1)]<- u$V2 a V1 V2 1 AAA 1 2 BBB 22 3 CCC

[R] Merge usage to update data.frame

2010-06-06 Thread Mario Valle
which case the second dataset value is taken. Is there a better method than my last line kludge? Thanks for your help! mario t1 <- textConnection("AAA 1 BBB 2 CCC 3") a <- read.table(t1, stringsAsFactors=FALSE) close(t1) t2 <- textConnection("BBB

Re: [R] AM/PM strptime %p failing 2.11.0 WinXP

2010-05-23 Thread Mario Valle
ched base packages: [1] stats graphics grDevices utils datasets methods base > Maybe you can try to set the LANGUAGE to English. Good luck! mario On 24-May-10 2:59, Samuel Dennis wrote: I am attempting to import dates in the following format to R: 5/20/2010 6:45:32 PM Unfor

Re: [R] apparent problems with the textConnection command

2010-05-19 Thread Mario Valle
Is not a problem of textConnection. It it how strings work. In them \ is the escape character, so you have to enter \\ Hope it helps mario ravi wrote: > Dear list, > In my experiments in reading in text data, I have obtained some peculiar > results. I would appreciate an

Re: [R] Fitting a function

2010-05-14 Thread Mario Valle
Have you tried Eureqa? http://ccsl.mae.cornell.edu/eureqa It tries to discover the model from your data. Try it, it is impressive (at least on my data). Ciao! mario On 14-May-10 15:07, Thomas Levine wrote: Actually, ignore my comment about that link. I don't think that li

Re: [R] sprintf funny behavior

2010-05-11 Thread Mario Valle
Not always the result of a function is printed on screen. Use: for(i in 1:4) print(sprintf("%d",4)) ciao! mario Matt Young wrote: >> sprintf("%d",4) > [1] "4" >> for(i in 1:4) sprintf("%d",4) >> for(i in 1:4) print(4) > [1]

Re: [R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
! mario On 27-Apr-10 0:54, John Kane wrote: I suspect that you may have to construct the legend by hand (well, by explicit text commands anyway) Something like this seems to work and it should not be that difficult to write a function to handle the text commands. plot(1:10,10:1,lty=1,type

Re: [R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
Thanks Uwe and Henrique! Both solution works and both have the same niceness/work.required ratio :-) Thanks again! mario On 26-Apr-10 14:02, Uwe Ligges wrote: On 26.04.2010 13:32, Mario Valle wrote: Dear all, I have a multiline plot with each line labeled with a

[R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
es nothing with letters. Any idea? plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a') legend("left", legend=c("ds1","ds2"), bty='n', col=1:2, lty=2,lwd=4,pch=letters) Thanks for your help! mario -

Re: [R] macro variable in R?

2010-04-22 Thread Mario Valle
Why don't use a list? m <- list() for(i in 1:10) { m[[i]] <- matrix(NA, i, i) } then access them as m[[7]][1,6] Ciao! mario On 22-Apr-10 18:08, karena wrote: I need to create 10 matrices. say matrix 1-10. matrix_1 is 1 by 1 matrix_2 is 2 by 2 matrix_

[R] Unexpected warning from matplot

2010-04-21 Thread Mario Valle
pch involved? Annoyance or feature? The fix (if needed) is simple. In the matplot code change: if (is.null(pch)) { to: if (is.null(pch) & (type[1] %in% c('p','b','o'))) { Best regards mario P.S.: R 2.9 on Win and Linux -- Ing. Mario Valle

Re: [R] Confusing concept of vector and matrix in R

2010-03-30 Thread Mario Valle
Reframe the problem. Rethink why you need to keep dimensions. I never ever had to use drop. My .02 something mario Barry Rowlingson wrote: > On Tue, Mar 30, 2010 at 2:42 AM, Rolf Turner wrote: > >> Well then, why don't you go away and design a

Re: [R] printing text within if functions inside a for loop

2010-03-23 Thread Mario Valle
Use: cat(sprintf("Long on %s at a price of %f\n",dates[j],data[j])) Hope it helps mario Tian Pan wrote: > Hi > > I am having a problem with outputting text inside an if function. I have the > following code: > > for (j in 20:length(bb.up)) &

Re: [R] Creating images without X11

2010-03-14 Thread Mario Valle
he "solution" does not help you). Ciao! mario On 14-Mar-10 6:14, Sharpie wrote: Jillian E Kozyra wrote: Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the

Re: [R] looking for a package to solve current-voltage equation I=f(I)

2010-03-12 Thread Mario Valle
?optim RSiteSearch("nonlinear equation solver") CRAN task view (optimization) Do a little work for your own before asking other to work for you. mario On 12-Mar-10 13:25, PtitBleu wrote: Hello, I'm looking for a R-package to solve such an equation : http://n4.

  1   2   >