[R] suprising behaviour of tryCatch()

2023-05-18 Thread Calboli Federico (LUKE)
lue of the fisher test to the vector. I stopped using �<-� eons ago so it took a bit to figure out. Tested on R 4.1.2 on ContOS 8 , and on R 4.3.0 on a M1 mac with the same result. I�d be obliged if someone can explain why tryCatch assigns items with �<-� and not �=�. Cheers F Federi

Re: [R] Finding the package providing funtion "%du%"

2021-06-30 Thread Federico Calboli
el stupid in public on the r-help list! F > > > > On Wed, Jun 30, 2021 at 1:03 PM Federico Calboli > wrote: > Hello All, > > I am playing with igraph (which seems to work for what I have used it). > Nevetheless: > > demo(&#x

[R] Finding the package providing funtion "%du%"

2021-06-30 Thread Federico Calboli
vctrs_0.3.8 generics_0.1.0 [10] ellipsis_0.3.2 tools_4.1.0 glue_1.4.2 purrr_0.3.4 compiler_4.1.0 pkgconfig_2.0.3 tidyselect_1.1.1 tibble_3.1.2 -- Federico Calboli LBEG - Laboratory of Biodiversity and Evolutionary Genomics Charles Deberiotstr

[R] install_github does not work locally

2021-04-13 Thread Federico Calboli
5.1purrr_0.3.4 callr_3.6.0 fs_1.5.0 ps_1.6.0 curl_4.3 testthat_3.0.2 [25] memoise_2.0.0 glue_1.4.2cachem_1.0.4 compiler_4.0.4 desc_1.3.0prettyunits_1.1.1 -- Federico Calboli LBEG - Laboratory of Biodiversity and Evolutionar

[R] how to feed lme() and lmer() data for a loop

2020-02-25 Thread Federico Calboli
building data frames on the fly, but this is cumbresome, both as code and very likely as performance, especially looping over lots of data having to generate these dummy data frames. If there is a trick I am missing I’d be grateful if anybody could set me straight. Best F -- Federico Calboli LBEG

Re: [R] keeping github packages up to date

2018-10-13 Thread Federico Calboli
ls. Cheers F > > On October 12, 2018 8:00:11 AM PDT, Federico Calboli > wrote: >> Hi all, >> >> more and more people (sadly) are putting stuff on github, with either >> no CRAN upload or an package. So I am stuck with using devtools and >> install

[R] keeping github packages up to date

2018-10-12 Thread Federico Calboli
Hi all, more and more people (sadly) are putting stuff on github, with either no CRAN upload or an package. So I am stuck with using devtools and install_github. I know how to keep stuff from CRAN updated — how do I do the same for github stuff? Cheers F -- Federico Calboli LBEG

[R] getting 21 very different colours

2018-09-11 Thread Federico Calboli
colourchart, but the visual differences between ’skyblue’ and ’slategrey’ elude me when plotted as dots on a plot). Cheers F -- Federico Calboli LBEG - Laboratory of Biodiversity and Evolutionary Genomics Charles Deberiotstraat 32 box 2439 3000 Leuven +32 16 32 87 67

[R] optim function

2018-07-13 Thread Federico Becerra
d already several "experts" in the internet but noone gave me a real solution. Thanks a lot, have a nice day, Federico -- Dr. Federico Becerra Morfología Funcional y Comportamiento Instituto de Investigaciones Marinas y Costeras Univ. Nac. Mar del Plata - CONICET CC 1245. Dean Funes 3250.(

[R] valid package repositories

2017-10-02 Thread Federico Calboli
that might be useful but I need to sort out. I am looking at formal claims ‘we have developed a method to do X and said method is available to the public as a R library’. If that is the claim I expect it to be true. Best F -- Federico Calboli LBEG - Laboratory of Biodiversity and

Re: [R] replicating PLINK's --genome calculations.

2016-10-06 Thread Federico Calboli
ed. Best F > > Cheers, > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Thu, Oct

[R] replicating PLINK's --genome calculations.

2016-10-06 Thread Federico Calboli
PLINK does, but I’d rather not reinvent the wheel so it might be worth asking: is there any package/function that would do (in R) what PLINK does with --genome? Bets wishes F -- Federico Calboli Ecological Genetics Research Unit Department of Biosciences PO Box 65 (Biocenter 3, Viikinkaari 1

[R] [R-pkgs] new version of package water: Actual Evapotranspiration with Energy Balance Models

2016-08-03 Thread Guillermo Federico Olmedo
Dear R users, I'm glad to announce the new version of water package (0.5). As this is my first message to the list, I want to add that this package provides tools to estimate actual evapotranspiration from surface energy balance models. Right now you can run the well-know METRIC model using it.

Re: [R] why is 9 after 10?

2016-02-12 Thread Federico Calboli
Dear John, that is fortunatey not the case, I just managed to figure out that the problem was that in the data reshaping pipeline the numeric column was transformed into a factor. Many thanks for your time. BW F > On 12 Feb 2016, at 17:22, Fox, John wrote: > > Dear Federico, &

[R] why is 9 after 10?

2016-02-12 Thread Federico Calboli
incredibly silly behaviour so that my table follows a reasonable expectation that 9 comes before 10 (and so on and so forth)? BW F -- Federico Calboli Ecological Genetics Research Unit Department of Biosciences PO Box 65 (Biocenter 3, Viikinkaari 1) FIN-00014 University of Helsinki Finland

Re: [R] testing whether two character vectors contain (the same) items in the same order

2015-08-07 Thread Federico Calboli
work with Cayley distances. It seems to me that > distCayley() in Rankcluster does what you want. From the examples: > > x=1:5 > y=c(2,3,1,4,5) > distCayley(x,y) > 8 > > > Cheers, > Boris > > > > > > On Aug 6, 2015, at 9:51 AM, Federico

Re: [R] testing whether two character vectors contain (the same) items in the same order

2015-08-06 Thread Federico Calboli
> > Bert > > On Thursday, August 6, 2015, Federico Calboli > wrote: > Hi All, > > let’s assume I have a vector of letters drawn only once from the alphabet: > > x = sample(letters, 15, replace = F) > x > [1] "z" "t" "g" "l

[R] testing whether two character vectors contain (the same) items in the same order

2015-08-06 Thread Federico Calboli
quot;f" "n" “v" y = x[c(1:7,9:8, 10:12, 14, 15, 13)] I would now like to test how good a match y is for x. Obviously I can transform the letters in numbers and use a rank test, but I was left wondering whether this is the only solution and whether there are more appropriat

Re: [R] what constitutes a 'complete sentence'?

2015-07-07 Thread Federico Calboli
eal with stats, maths and computers should define what is a grammatically acceptable description, as opposed to a description. If I describe my package poorly it might not be used as much, and thus it might represent a wasted effort for *me*. Incidentally, not being able to use ‘pkgname&

Re: [R] what constitutes a 'complete sentence'?

2015-07-03 Thread Federico Calboli
> sentence. > > Cheers > Petr > >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Hadley >> Wickham >> Sent: Friday, July 03, 2015 1:14 PM >> To: Federico Calboli >> Cc: R-help >> Subject

Re: [R] what constitutes a 'complete sentence'?

2015-07-03 Thread Federico Calboli
That exists already: last slide here — it looks like it is a know issue. BW F > On 3 Jul 2015, at 14:13, Hadley Wickham wrote: > > In that case, you need to create a minimal reproducible example and make it > publicly available. > > Hadley > > On Friday, July 3

Re: [R] what constitutes a 'complete sentence'?

2015-07-03 Thread Federico Calboli
it does not help. BW F > > Hadley > > On Fri, Jul 3, 2015 at 10:09 AM, Federico Calboli > wrote: >> Hi All, >> >> I am upgrading a package for CRAN, and I get this note: >> >> checking DESCRIPTION meta-information ... NOTE >> Ma

[R] what constitutes a 'complete sentence'?

2015-07-03 Thread Federico Calboli
coded that check? Best F -- Federico Calboli Ecological Genetics Research Unit Department of Biosciences PO Box 65 (Biocenter 3, Viikinkaari 1) FIN-00014 University of Helsinki Finland federico.calb...@helsinki.fi __ R-help@r-project.org mailing list

Re: [R] grepping out columns

2015-02-18 Thread Federico Lasa
David's almost works except it catches the "MONTH" column, just add an empty metacharacter tho. c("DAY", "MONTH", "YEAR", "SA_TUES", "SA_MON", "SU_WED", "CH_TUES", "CH_WED", "CH_MON", "AR_TUES", "AR_WED", "AR_MON", "SA_THUR", "SU_FRI", "CH_THUR", "CH_FRI", "AR_THUR", "AR_FRI")-> columns sa_ind <-

Re: [R] Help with continuous color plot

2014-09-24 Thread Federico Lasa
e geom, and factor the correct variable. On Wed, Sep 24, 2014 at 2:14 PM, Federico Lasa wrote: > Does this resemble what you're after? > > library(reshape2) > tst <- melt(testdataset) > library(ggplot2) > > ggplot(tst, aes(x=Var1, y=Var2, fill=value)) + > geom_ti

Re: [R] Help with continuous color plot

2014-09-24 Thread Federico Lasa
Does this resemble what you're after? library(reshape2) tst <- melt(testdataset) library(ggplot2) ggplot(tst, aes(x=Var1, y=Var2, fill=value)) + geom_tile() + scale_fill_gradient2(low="white", high="white", mid=scales::muted("blue"), midpoint=0.6148377) On Wed, Sep 24, 2014 at 10

Re: [R] ggplot - boxplot and points split by two factors

2014-09-08 Thread Federico Lasa
Use geom_jitter() instead of geom_point On Mon, Sep 8, 2014 at 12:37 PM, Tom Wright wrote: > ggplot(data,aes(x = z1, y = x, fill=x2)) + > geom_boxplot() + > geom_point(alpha=0.5, > position=position_jitterdodge(jitter.width=0.1), > aes(group=x2)) > > On Mon, 2014-09-08 at 13:1

Re: [R] ordinary kriging: the edges of the polygons are ignored

2014-08-21 Thread Federico Calboli
res = autoKrige(temp~1, U, housegrid) > spplot(res$krige_output, col.regions = rev(heat.colors(100))) > # Your result is in the var1.pred-variable of res$krige_output > > You will generally get more and quicker answers to questions about spatial > data and methods from the r-sig-g

[R] ordinary kriging: the edges of the polygons are ignored

2014-08-20 Thread Federico Calboli
Hi All, I am trying to do some kriging of a floor, based on a number of heat sensors. My data looks like this: sensortempxy 1 1 1.25437406 390 2960 2 2 0.64384594 830 2960 3 3 1.52067733 1420 2960 4 4 1.21441928 3127 2920 5 5 1.04227694 400

Re: [R] Legend in ggplot2

2014-08-07 Thread Federico Lasa
The problem is that you are not actually 'mapping' any variables to the fill and colour aestethics so ggplot wont produce legends for those. I'm not sure ggplots are appropiate for what you're trying to do here but you can sure hack around it a bit, for instance try: ggplot(tabu, aes(x=weeks, y=T)

Re: [R] Installing RMySQL on Debian

2014-07-11 Thread Federico Razzoli
me, re-read my first mail: you will see how I specified paths and which errors I got. Federico __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

Re: [R] Installing RMySQL on Debian

2014-07-10 Thread Federico Razzoli
th-mysql-dir=DIR' RMySQL_.tar.gz ERROR: configuration failed for package ‘RMySQL’ * removing ‘/usr/local/lib/R/site-library/RMySQL’ * restoring previous ‘/usr/local/lib/R/site-library/RMySQL’ The downloaded source packages are in ‘/tmp/RtmpaJ2WeK/downloaded_packages’ Warning message

[R] Installing RMySQL on Debian

2014-07-10 Thread Federico Razzoli
in package ‘RMySQL’ Creating a generic function for ‘print’ from package ‘base’ in package ‘RMySQL’ ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (RMySQL)

Re: [R] multiple plots on same sheet in R

2014-04-16 Thread Federico Lasa
see: ?par Does running par(mfrow=c(4,3)) do the job? On Wed, Apr 16, 2014 at 7:33 AM, eliza botto wrote: > Dear useRs, > I drew 12 separate raster maps. I want to combine them in such a way the they > appear on the same sheet in R, which will later on be saved. Each row should > contain t

Re: [R] Does a survival probability(the probability not experiencing an event) have to be non-increasing?

2014-03-19 Thread Federico Lasa
Don't really understand your equations but. If X is the (random variable of) time of event, then the survival S(x) = 1 - Pr( X < x ) has to be non increasing since: If t1 < t2. then S(t1) - S(t2) = Pr(X < t2) - Pr( X < t1 ) = Pr( t1 < X < t2) > 0 which means that S(t1) > S(t2). But you mu

Re: [R] Knitr, ggplot and consistent fonts

2013-12-23 Thread Federico Lasa
Hi, chiming in. Pasted the code in R studio and the format parser wouldn't mark the R code chunks. It was because there were line breaks in the middle of chunk options tags. Couldn't test if removing line breaks works, but maybe that's the source of the problem? On Mon, Dec 23, 2013 at 10:37 AM,

Re: [R] How to generate a smoothed surface for a three dimensional dataset?

2013-12-04 Thread Federico Andreis
Hi Jun, I'd for a local fitting by means of the loess() function. Assuming z is the third axis: x<-runif(25) y<-runif(25) z<-runif(25) xyz.fit <- loess(z~x+y,control=loess.control(surface='direct'),span=.5,degree=1) #tune parameters as you like z.predict <-matrix(predict(xyz.fit,cbind(x,y)),5,5

[R] vcf, plink and other files in the /demo of a package

2013-12-02 Thread Federico Calboli
Hi All, together with colleagues we are planning to submit a 2.0 version of a package we have on CRAN. Because the package deals with high throughput genomic data we though it would be nice to have some sort of guidance for the users. This should ideally mean a 'vignette', but as the time of

Re: [R] repeating values in an index two by two

2013-11-11 Thread Federico Calboli
12:35, andrija djurovic wrote: > Hi. Here are two approaches: > > c(mapply(function(x,y) rep(c(x,y), 2), (1:10)[c(T,F)], (1:10)[c(F,T)])) > > c(tapply(1:10, rep(1:(10/2), each=2), rep, 2), recursive=T) > > Andrija > > > > > > On Mon, Nov 11, 2013 at 1:11 PM,

[R] repeating values in an index two by two

2013-11-11 Thread Federico Calboli
Hi All, I am trying to create an index that returns something like 1,2,1,2,3,4,3,4,5,6,5,6,7,8,7,8 and so on and so forth until a predetermined value (which is obviously even). I am trying very hard to avoid for loops or for loops front ends. I'd be obliged if anybody could offer a suggestion

[R] R vs octave development strategy (and success)

2013-10-29 Thread Federico Calboli
Hi All, if memory serves me well I recall some paper comparing the relative success in getting mainstream acceptance (as mainstream as statistics can be) of both R and Octave. I remember vaguely that the fact the development strategies (core team vs one main developer) played a major role in t

Re: [R] How many samples ACTUALLY used in regression?

2013-03-18 Thread Federico Calboli
, is there a (hopefully) trivial way of getting nobs(poor.fit) to behave like a nobs(vlm.fit)? BW Federico > >> Brian >> >> Brian S. Cade, PhD >> >> U. S. Geological Survey >> Fort Collins Science Center >> 2150 Centre Ave., Bldg. C

[R] How many samples ACTUALLY used in regression?

2013-03-18 Thread Federico Calboli
same way -- irrespective of the model type -- to interrogate my.model to see how many samples of my.data were actually used. Is there such function or do I need to hack something together? Best wishes Federico __ R-help@r-project.org mailing list

Re: [R] checker/chequer board pattern as a colour

2013-01-07 Thread Federico Calboli
; > Be careful of overusing something like this, too many patterned areas in a > plot can be more distracting and distorting than useful. thanks, but that sounds way too much hassle than it's worth BW F > > > On Mon, Jan 7, 2013 at 8:00 AM, Federico Calboli > wrote: &g

[R] checker/chequer board pattern as a colour

2013-01-07 Thread Federico Calboli
Hi All, is there a reasonably simple way of using a black and white chequer/checker board pattern as a colour: barplot(mydata, col = c('red', 'blue' 'checkerboard')) ? BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, S

[R] bigmatrix and irlba

2012-09-13 Thread federico ferreyra
Hello, good mornig, i have one questions, anybody know how to calculate svd of a matrix of the library bigmatrix with library irlba? thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] calculate svd of a matrix larger then memory

2012-09-08 Thread federico ferreyra
Hello How are you? I was reading  BigMemory´s  library documentation and I have no clear some things, challenged my problem, I have a disk array with 2GB weighing coefficients float's, just numbers, and I have to find the singular value decomposition this matrix, basically the question is: how t

[R] calcular SVD de una matriz que no entra en memoria

2012-09-08 Thread federico ferreyra
Hola como andan? estuve leyendo un poco la documentacion de la libreria BigMemory y no me quedan claro algunas cosas, le planteo mi problema, tengo un matriz en disco que pesa 2gb con coeficientes float´s, solo numeros, y tengo que hallar la descomposicion en valores singulares de esta matriz, b

[R] hidden for() loop subsetting a matrix?

2012-08-15 Thread Federico Calboli
is the subsetting action doing something smarter than just extracting each value reading one set of coordinates at a time? This is purely an academic question, but I'm very curious about the answer. Best wishes, Federico -- Federico C. F. Calboli Neuroepidemiology and Ageing Res

[R] Quantile regression questions

2012-07-19 Thread Federico Weyland
or each coefficient in the second output? Is there a problem with tables? 2) Are the two outputs showing the same information? Can I interpret that if zero is included in the interval of the second output, the coefficient is not different from zero? T

[R] rtags for VI(M)

2012-03-09 Thread Federico Calboli
Hi, according to the help file rtags does not support VI(M) yet. Is there any known hack to ctags to get tags for R in VI(M)? BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602

Re: [R] closing file with close(file) *silently*

2012-03-06 Thread Federico Calboli
On 6 Mar 2012, at 18:01, Sarah Goslee wrote: > The help for warning offers some suggestions. none that seem to work though. F > > Sarah > > On Tue, Mar 6, 2012 at 12:53 PM, Federico Calboli > wrote: >> Hi All, >> >> I am writing a function that

[R] closing file with close(file) *silently*

2012-03-06 Thread Federico Calboli
ssary noise for the user, and I'd like to kill the warning -- without having to mess with global options. Any ideas how? BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602

[R] [R-pkgs] MultiPhen 0.3 is available on CRAN

2012-03-03 Thread Federico Calboli
release it until next week to add other possible improvements. For all asking for the related paper, Paul should be ready with the final draft 'soon'. Cheers Federico -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place

[R] Schoenfeld residuals for a null model coxph

2012-02-23 Thread Federico Calboli
all 0s. BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com ___

Re: [R] variance explained in a cox ph model

2012-02-22 Thread Federico Calboli
enfeld residuals (which are calculated as a matter of fact by residuals()/resid()), and I am looking at Muller et al. Quantifying the contribution of genetic variants for survival phenotypes Genetic Epidemiology 2008 BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imper

[R] variance explained in a cox ph model

2012-02-21 Thread Federico Calboli
(mod1, mod2) tells me whether I get a significant improvement of the fit, but does not tell me how much variance I actually explain… BW Federico -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44

[R] logical subsetting, indexes and NAs

2012-01-28 Thread Federico Calboli
lt;15] > y [1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 How do I get rid of the NA (not post hoc)? BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 759431

Re: [R] cat, and printing the last separator

2012-01-25 Thread Federico Calboli
cat(1, file= '', sep = '\n') 1 > Though I admit my memory could be wrong. Thank you for the solution btw. BW Federico > >> >> How would I overcome this issue? I tried a number of things, all of which >> have failed. >> > > I'

[R] cat, and printing the last separator

2012-01-25 Thread Federico Calboli
ch is something that bugs me a bit, given that fact I'm trying to have some copy-paste ready stuff to put in a table. How would I overcome this issue? I tried a number of things, all of which have failed. BW F -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial

[R] R on Android

2012-01-01 Thread Federico J. Villatoro
Hello,I am new to this list. I have ben wondering if there is an app to run R on mobile devices? Specially android...Thanks in advance Federico -- Federico [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] barplot ignoring col parameter

2011-12-05 Thread Federico Calboli
1:24] 2 108 0 0 0 1 3 0 0 0 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:24] "A" "B" "C" "D" ... Basically, using the 'x' object as you created the code works, and I can have a workaround. I fail to see why it would no

[R] barplot ignoring col parameter

2011-12-05 Thread Federico Calboli
ed',9)) barplot(mydata, col = mycol) gives me an uniformly yellow barplot. How do I solve this? bw Federico -- Federico C. F. Calboli Neuroepidemiology and Ageing Research Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)2

[R] fitting some form of linear model with bimodal distribution of dependent variable

2011-11-25 Thread Federico Calboli
if any, could handle such situation. Any suggestions? I tried glm with family = quasi binomial, but it's obviously wrong if no other reason that it does not accept the bimodal parameter (it wants it to be 0s and 1s). Cheers Federico -- Federico C. F. Calboli Neuroepidemiology an

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
On 3 Aug 2011, at 17:46, Sarah Goslee wrote: > Hi Federico, > > A forward slash isn't a special character: > >> strsplit("T/T", "/") > [[1]] > [1] "T" "T" > > so there's some other problem. > > Are you

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
On 3 Aug 2011, at 17:41, Duncan Murdoch wrote: > > It looks as though your my.data[1,1] value is a factor, not a character value. > > strsplit(as.character(my.data[1,1]), "/") Thanks Duncan, this solved it. Best Federico > > would work, or you could avoid

[R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
"/") # and any variation thereof Error in strsplit(apoe[1, 1], "/") : non-character argument Any advice will be gratefully received. Best wishes, Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary's Campus Norfolk

Re: [R] exponent function help??

2011-07-13 Thread Federico Andreis
if just integer exponentiation is enough, then I'd suggest: expf <- function(x, n) { return(prod(rep(x, abs(n)))^sign(n)) } cheers. /federico On Wed, Jul 13, 2011 at 6:24 AM, Ben Bolker wrote: > mousy0815 gmail.com> writes: > > > I'm trying to make a function t

Re: [R] RES: applying function to multiple columns of a matrix

2011-07-12 Thread Federico Calboli
b > [1] 3 6 9 12 >> mapply(x=rng.a, y=rng.b, function(x,y) sum(dta[,c(x:y)])) > [1] 30 75 120 165 >> > > Cheers, > Filipe > > -Mensagem original- > De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Em > nome de Federico Calboli

[R] applying function to multiple columns of a matrix

2011-07-12 Thread Federico Calboli
requiring a for loop to create the list (not all my data is conveniently of 9 columns only). Any suggestion would be much appreciated. Bw Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
On 8 Jul 2011, at 16:12, Barry Rowlingson wrote: > On Fri, Jul 8, 2011 at 4:07 PM, Federico Calboli > wrote: >> On 8 Jul 2011, at 15:56, Spencer Graves wrote: >>>> Ok, thanks for that. I though that, since R in under GPL-v2, I can only >>>> release my c

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
cer > >> >> On uploading the new version (a matter of days), I will specify the GPL >> version. >> >> Bw >> >> Federico >> >> >>> Duncan Murdoch >>> >>>> bw >>>> >>>> Federico >>

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: > On 11-07-08 6:20 AM, Federico Calboli wrote: >> HI All, >> >> I have written and succesfully uploaded a new package. The licence it is >> under is 'GPL' --no version. My assumption is, since all the code is wr

[R] Making a new package: licence

2011-07-08 Thread Federico Calboli
R is under") I am happy with the licencing I used, but I'd like to ask if there is any transitive propery of IP licencing or if I am mistaken. bw Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary's Campus Norfolk Place, Lon

Re: [R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Federico Calboli
topic > (http://www.jstatsoft.org/v38). > > I hope it helps. > > Best, > Dimitris > > > On 6/3/2011 12:17 PM, Federico Calboli wrote: >> I am writing to get a better handle on a warning I am getting from a coxph >> analysis I am doing. >> >> I

[R] Surv(): Stop time must be > start time, NA created

2011-06-03 Thread Federico Calboli
lly do. So my question: how do I deal with the instances where age.park == age.dem in order to keep those individuals in the analysis and to get sensible results? Best wishes Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary'

[R] Thiessen Method

2011-05-25 Thread federico eccel
Dear Users, I would like to know if any of you know some R packages for appling the Thiessen method; in my case I would like to interpolete with this method some rain gauges. Tanks a lot [[alternative HTML version deleted]] __ R-help@r-project

[R] strange PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL

2011-03-19 Thread Federico Bonofiglio
Hi Dears, When I introduce an interaciton in a piecewise model I obtain some quite unusual results. If that would't take u such a problem I'd really appreciate an advise from you. I've reproduced an example below... Many thanks x<-rnorm(1000) y<-exp(-x)+rnorm(1000) plot(x,y) abline(v=-1,c

[R] PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL: THEY AIN'T LINEAR BETWEEN BREAK POINTS!!

2011-03-18 Thread Federico Bonofiglio
int is not straight at all, instead behaves like if it was a hig order polynomial or something similar I attach the codes below, hoping someone can point me the mistake I sincerely express many thanks in advance .. Federico Bonofiglio frame3<-data.frame(id,chol,cd4,rt,sex,age, nadir

[R] intervals {nlme} lower CI greater than upper CI !!!????

2011-02-08 Thread Federico Bonofiglio
00 rt:cd4 -0.0001150701 -4.667572e-05 2.171870e-05 attr(,"label") [1] "Fixed effects:" ...check for instance on row 2 and 5 (bold numbers)isn't something really weird there ? lower interval greater than upper !! Federico -- *Little u can do against ignoran

[R] glht{multcomp} : use with lme {nlme}

2011-02-08 Thread Federico Bonofiglio
Hi dears, I do > CHOL<-lme(chol~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+ haartd+hivdur+factor(arv), random= ~rt|id, na.action=na.omit) ...runs sweet,..then try a multicomparisons approach for the categorical rf > summary(glht(CHOL, linfct=mcp(rf="Tukey"))) * Error in model

[R] random interaction effect in lmer

2011-02-06 Thread Federico Bonofiglio
Hi dears while modeling an interaction random effect in lmer i receive the instantaneous error message > ldlM4<-lmer(ldl~rt*cd4+age+rf+pharmac+factor(hcv)+ + hivdur+(rt:cd4|id),na.action=na.omit,REML=F) *Warning message: In mer_finalize(ans) : false convergence (8) * I think the matter lies in syn

[R] TRADUCING lmer() syntax into lme()

2011-01-23 Thread Federico Bonofiglio
tion) grouped by by a general nesting structure that sets factorA1 and factorA2 as same level effects (hence non nested) and factorB as nested in both. I also must express my momentaneous sheer ignorange on the pdMat objects, thing that prabably is not helping me in the process Kindly Regards

Re: [R] piecewise regression

2011-01-15 Thread Federico Bonofiglio
immediate > by > > > "regression" > > > summary(p.r) # 15 matches in 13 packages > > > p.4 # to view in a web browser > > > > > > > > > Beyond this, the "structchange" package supports looking for > changes &

[R] piecewise regression

2011-01-14 Thread Federico Bonofiglio
Hello everybody Quick question, if you'd like to throw a little tip: does anyone knows a function that runs piecewise regression models with coefficients estimation and inferences ? Thank you [[alternative HTML version deleted]] __ R-help

[R] graphics: 3D regression plane

2011-01-12 Thread Federico Bonofiglio
t;-lm(y~rd*k) newax<- expand.grid( days = giorni<-seq(min(rd),max(rd), length=100), expl= esplic<- seq(min(k), max(k), length=100) ) fit <- predict(mod,data.frame(rd=giorni,k=esplic)) graph <- persp(x=giorni, y=esplic,fit, expand=0.5, ticktype="detailed", the

[R] logistic regression with response 0,1

2010-12-29 Thread Federico Bonofiglio
ies: - are the estimates correct? - degrees of freedom exponentiate dramatically (one per cell) , so may I risk to never obtain a significant result? I also take the chance to ask wheater u know any implemented method to plot logistic curves directly out of a glm() model I would like to thank u a

[R] where are my pspline knots?

2010-11-17 Thread Federico Calboli
cases are there between each knot. Best, Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmai

[R] anomalies with the loess() function

2010-10-26 Thread Federico Bonofiglio
Hello Masters, I run the loess() function to obtain local weighted regressions, given lowess() can't handle NAs, but I don't improve significantly my situation.., actually loess() performance leave me much puzzled I attach my easy experiment below #--SCRIPT---

[R] lowess() won't handle NAs

2010-10-25 Thread Federico Bonofiglio
expression("p<0.001"), cex=1.5,font=3) }else{ text(locator(1),as.expression(substitute(p==pval),list(pval=pval)), cex=1.5,font=3) } } #THANK U 4 THE EVENTUAL ADVISE.!! Federico, Student of Statistics at Milano-Bicocca [[alternative HTML version deleted]]

[R] dpois().......bizarre warning messages

2010-10-17 Thread Federico Bonofiglio
Dear Masters, I have a question to submit consider the following script m<-4.95 obs<-rpois(36,m) # i generate 36 realization from a poisson(m) hist(obs,freq=F) curve(dpois(x,m),add=T,col="red") #i wish to overlay on the histogram the theorical poisson density function errors are returned sain

[R] rounding issues

2010-10-14 Thread Federico Calboli
issue 407585.91/100 [1] 4075.859 -- the right answer is 4075.8591 I have no saved .Rwhatever in my environment, and I never set any option to have such strange rounding. I'm obviously missing something, and I'd appreciate suggestions. Best, Federico -- Federico C. F. Calboli Department

Re: [R] Syntax Highlightning and Editor for Linux

2010-07-23 Thread Federico Andreis
pinion) and nice interface..give it a try! /federico On Fri, Jul 23, 2010 at 2:42 PM, Rainer M Krug wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 23/07/2010 14:17, Alaios wrote: > > I would like to thank you for your immediate reply. > > Actually I do not lik

[R] DIF Analysis starting from a gpcm class object

2010-07-21 Thread Dr. Federico Andreis
such a thing by myself? and if so, how can I extract what I need from the model object? thanks to everybody /federico ----- Dr. Federico Andreis Università degli Studi di Milano-Bicocca, PhD Student MEB Department, Karolinska Institutet, Stockholm, Visit

Re: [R] Exporting NMDS distance matris to csv

2010-07-20 Thread Federico Andreis
want THIS on fortune() ! ahhahah sorry for the OT :) /federico [[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-proje

Re: [R] Multilevel IRT Modelling

2010-07-15 Thread Federico Andreis
Thanks Stuart, I already had some of those papers, will check the others! best Federico On Wed, Jul 14, 2010 at 9:05 PM, Stuart Luppescu wrote: > On Wed, 2010-07-14 at 04:31 -0700, Dr. Federico Andreis wrote: > > does anybody know of a package (working under Linux) for multileve

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Federico Andreis
I guess you could just use as an argument to sample data[,-c(1,2)] where 1 and 2 are id and pID50 column number On Wed, Jul 14, 2010 at 7:17 PM, Addi Wei wrote: > > id pID50 apol a_acca_acid a_aro a_base a_count > 1 mol.11 3.63 -0.882267 -0.527967 -0.298197 -1.032380

[R] Multilevel IRT Modelling

2010-07-14 Thread Dr. Federico Andreis
Dear All, does anybody know of a package (working under Linux) for multilevel IRT modelling? I'd love to do this without having to go on WINSTEPS or the like.. thanks for the attention! Federico Andreis - Dr. Federico Andreis Università degli Studi di Milano-Bicocca, PhD Studen

Re: [R] coxph and remaing events

2010-06-15 Thread Federico Calboli
On 15 Jun 2010, at 18:34, Federico Calboli wrote: > I'm running a cox ph model on a dataset with a number of variables. Each > variable has a different number of missing data, so that coxph() drops the > individuals who are missing data at one or more variables. Because of th

[R] coxph and remaing events

2010-06-15 Thread Federico Calboli
vents I am left with in the model. Is there a way of extracting them from the coxph() fit? or in any other reasonably efficient way? Best, Federico -- Federico C. F. Calboli Department of Epidemiology and Biostatistics Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel

  1   2   >