Re: [R] Fortran and long integers

2011-02-07 Thread Berend Hasselman
Tsjerk Wassenaar wrote: Yes, thnx... Typo :$ On Mon, Feb 7, 2011 at 8:23 AM, Berend Hasselman b...@xs4all.nl wrote: Tsjerk Wassenaar wrote: Hi, Does it alleviate things if you rewrite the sums to avoid large products? For I even: J+I*(N-I/2)-(N-I/2) Shouldn't that be

Re: [R] Fortran and long integers

2011-02-07 Thread Peter Langfelder
This only helps to some extent. If you set I=N and J=N then with N somewhere between 113000 and 114000 ioffset will turn negative. Thanks to all for suggestions. N=113000 is by far out of range since (as far as I can tell) the distance structure would be longer than R can presently handle,

Re: [R] mle question

2011-02-07 Thread Antje Niederlein
Hello, is there somebody who can help me with my question (see below)? Antje On 1 February 2011 09:09, Antje Niederlein niederlein-rs...@yahoo.de wrote: Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the

[R] Confused

2011-02-07 Thread Joel
Hi Im confused by one thing, and if someone can explain it I would be a happy rev(strsplit(hej,NULL)) [[1]] [1] h e j lapply(strsplit(hej,NULL),rev) [[1]] [1] j e h Why dossent the first one work? What is it in R that fails so to say that you need to use lapply for it to get the correct

Re: [R] Giving vector of colors to line in plots

2011-02-07 Thread Peter Ehlers
On 2011-02-06 22:15, statmobile wrote: Hey all, I can't for the life of me figure out what I'm missing here. I'm trying to change the color of the line in a time series type plot. I can change the point colors and symbols no problem, but for some reason the colors do not get passed to the

Re: [R] Confused

2011-02-07 Thread Peter Ehlers
On 2011-02-07 00:18, Joel wrote: Hi Im confused by one thing, and if someone can explain it I would be a happy rev(strsplit(hej,NULL)) [[1]] [1] h e j lapply(strsplit(hej,NULL),rev) [[1]] [1] j e h Why dossent the first one work? What is it in R that fails so to say that you need to use

Re: [R] Confused

2011-02-07 Thread Ted Harding
On 07-Feb-11 08:18:49, Joel wrote: Hi Im confused by one thing, and if someone can explain it I would be a happy rev(strsplit(hej,NULL)) [[1]] [1] h e j lapply(strsplit(hej,NULL),rev) [[1]] [1] j e h Why dossent the first one work? What is it in R that fails so to say that you

Re: [R] FW: multivariate regression

2011-02-07 Thread Dennis Murphy
Hi: You don't state the test for which you want the p-value, and to reiterate what Dr. Ligges asked in response to your earlier post, how do you propose to define a single R^2 measure? One may be able to answer your question re an overall significance test using the anova() function:

[R] [R-pkgs] R package hypred: Simulation of genomic data in applied genetics

2011-02-07 Thread Frank Technow
Dear useRs, I am glad to announce that the new R package hypred, initial version 0.1, is now available on CRAN. hypred is a package for simulating high-density SNP data. Its main function, hypredRecombine is intended to be used as a Software tool in larger programs that simulate complex

Re: [R] FW: multivariate regression

2011-02-07 Thread Mark Difford
Deniz, There are 3 F statistics, R2 and p-values. But I want just one R2 and pvalue for my multivariate regression model. Which is as it should. Maybe the following will help, but we are making the dependent variables the independent variables, which may or may not be what you really have

[R] multiple imputation manually

2011-02-07 Thread Sarah
Hi, I want to impute the missing values in my data set multiple times, and then combine the results (like multiple imputation, but manually) to get a mean of the parameter(s) from the multiple imputations. Does anyone know how to do this? I have the following script: y1 - rnorm(20,0,3) y2 -

Re: [R] Giving vector of colors to line in plots

2011-02-07 Thread Jim Lemon
On 02/07/2011 05:15 PM, statmobile wrote: Hey all, I can't for the life of me figure out what I'm missing here. I'm trying to change the color of the line in a time series type plot. I can change the point colors and symbols no problem, but for some reason the colors do not get passed to the

Re: [R] Image to plot

2011-02-07 Thread Jim Lemon
On 02/07/2011 06:37 PM, Alaios wrote: Dear all I would like to plot the contents of a matrix as an Image. I found this code here http://www.phaget4.org/R/image_matrix.html but this is not only what I want. Instead of having inside every cell the color of the cell it would be nice to have also

[R] mle question

2011-02-07 Thread Antje Niederlein
Hello, is there somebody who can help me with my question (see below)? Antje On 1 February 2011 09:09, Antje Niederlein niederlein-rs...@yahoo.de wrote: Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes

Re: [R] different results in MASS's mca and SAS's corresp

2011-02-07 Thread Gavin Simpson
On Sat, 2011-02-05 at 23:39 -0600, Paul Johnson wrote: On Sat, Feb 5, 2011 at 9:19 AM, David Winsemius dwinsem...@comcast.net wrote: snip / cbind(scalermca[,1] * 0.827094, scalermca[,2] * -0.7644828) [,1][,2] 1 1.06070017 -0.8154 2 0.77057891 0.63456780 3

[R] series of boxplots

2011-02-07 Thread syrvn
hi group, imagine the following data frame df: 1 2 3 4 ... A 5 1 .. A 4 3 .. A 3 4 .. B 7 9 .. B 8 1 .. B 6 8 .. I tried the following and some variations to plot this matrix as boxplots: boxplot(df[1:3,2]~df[1:3,1], xlim=c(1,10)) par(new=TRUE) boxplot(cpd12[4:6,2]~df[1:3,1], xlim=c(2,10))

Re: [R] aggregate function - na.action

2011-02-07 Thread Matthew Dowle
Looking at the timings by each stage may help : system.time(dt - data.table(dat)) user system elapsed 1.200.281.48 system.time(setkey(dt, x1, x2, x3, x4, x5, x6, x7, x8)) # sort by the 8 columns (one-off) user system elapsed 4.720.945.67 system.time(udt

Re: [R] Image to plot

2011-02-07 Thread Alaios
Thanks a lot. That did the trick :) --- On Mon, 2/7/11, Jim Lemon j...@bitwrit.com.au wrote: From: Jim Lemon j...@bitwrit.com.au Subject: Re: [R] Image to plot To: Alaios ala...@yahoo.com Cc: R-help@r-project.org Date: Monday, February 7, 2011, 9:39 AM On 02/07/2011 06:37 PM, Alaios

Re: [R] using character vector as input argument to setkey (data.tablepakcage)

2011-02-07 Thread Matthew Dowle
Hi Sean, Try : key(test.dt) = c(a,b) Btw, the posting guide asks you to contact the maintainer of the package before r-help. Otherwise r-help would fill up with posts about 2000+ packages (I guess is the reason). In this case maintainer(data.table) returns

Re: [R] Fortran and long integers

2011-02-07 Thread David Duffy
On Mon, 7 Feb 2011, Berend Hasselman b...@xs4all.nl wrote: The overflow is not caused by 16 bits integers. I'm quite sure the OP is using 32 bit integers. The overflow is caused by the multiplication N*(i-1) and/or i*(i+1). In Fortran there's not much you can do about this unless your

[R] matrix is not of full rank error in package tgp

2011-02-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I want to use the package tgp with its sens() function to cunduct a sensitivity analysis of an ecological simulation model and six independent input parameter. I conducted 10.000 simulations based on a Latin Hypercube design to sample the whole

[R] can I use the output of a neural network as the fitness function of genetic algorithm?

2011-02-07 Thread ying zhang
Hi Everyone, I need to use genetic algorithm to find the minimum. The problem is, I cannot define the fitness function, but I can build a neural network from the input data and use the output as a fitness function. Can this be done? The other problem is, I know there are a few package

Re: [R] Image to plot

2011-02-07 Thread Alaios
Hello again, actually I am trying to store many files to hard disk and thus I want to 1.create new plot 2.save it 3. close it I have successfuly completed 1 and 2 but when I try to close it

Re: [R] aggregate function - na.action

2011-02-07 Thread Hadley Wickham
On Mon, Feb 7, 2011 at 5:54 AM, Matthew Dowle mdo...@mdowle.plus.com wrote: Looking at the timings by each stage may help :   system.time(dt - data.table(dat))   user  system elapsed   1.20    0.28    1.48   system.time(setkey(dt, x1, x2, x3, x4, x5, x6, x7, x8))   # sort by the 8 columns

Re: [R] Confidence interval based on MLE

2011-02-07 Thread Jinsong Zhao
On 2011-2-6 22:56, Ben Bolker wrote: Jinsong Zhaojszhaoat yeah.net writes: Hi there, I have fitted a sample (with size 20) to a normal and/or logistic distribution using fitdistr() in MASS or fitdist() in fitdistrplus package. It's easy to get the parameter estimates. Now, I hope to report

[R] tri-cube and gaussian weights in loess

2011-02-07 Thread wisdomtooth
From what I understand, loess in R uses the standard tri-cube function. SAS/INSIGHT offers loess with Gaussian weights. Is there a function in R that does the same? Also, can anyone offer any references comparing properties between tri-cube and Gaussian weights in LOESS? Thanks. - André --

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread B77S
Also, I really appreciate you explaining why you used factor. I'm still not quite sure what set.seed does (i read ?set.seed) or why you chose 123... but it and the function below work, so that is all that matters. :) randSub - function(L1, s.size) { set.seed(123) samptbl - apply(L1, 1,

Re: [R] uniroot

2011-02-07 Thread dpender
Thanks for your advice. There was an error in the equation that is was copying. Doug -- View this message in context: http://r.789695.n4.nabble.com/uniroot-tp3260090p3264288.html Sent from the R help mailing list archive at Nabble.com. __

[R] how to efficiently extract elements of a list?

2011-02-07 Thread Sean Zhang
Dear R helper, I wonder whether there is a quick way to extract some elements for a list. for a vector we can do the following vec - seq(3) names(vec) - LETTERS[1:3] vec[c(1,3)] vec[c('A','C')] But for a list, test.l - list(c(1,3),array(NA,c(1,2)),array(0,c(2,3))) names(test.l)-LETTERS[1:3]

[R] waveThresh plot axis

2011-02-07 Thread Eva Ampe
Dear, I am using WaveTresh for Haar Wavelets. It works all fine exept when I want to adjust the axis on the wavelet coefficient plot: input:wlh_ponds-wd(input_waves[,1], family=DaubExPhase,filter.number=1) plot: plot(wlh_ponds,scaling=by.level) My problem is twofold= -I want the

Re: [R] FW: multivariate regression

2011-02-07 Thread Deniz SIGIRLI
The test is manova. I tried to use manova() function, I used the code below:fit - manova(Y ~ X)summary(fit, test=Wilks)but I get p values for intercept and regression coefficient as in anova() function, not for the hull model. Date: Mon, 7 Feb 2011 00:57:43 -0800 Subject: Re: [R] FW:

[R] How to mix copulas in R

2011-02-07 Thread E B
Hello, I would like to compute a Gumbel-Clayton mix copula in R. Does anyone know how to do it? I use the package copula and fcopulae but I don't find any function to mix different copulas. If anyone could give me some advices or know how to compute a mix of copulas in R, that would be great.

[R] Unbalanced Mixed Linear Models With Nested Stratum

2011-02-07 Thread JaFF
Hi folks, I have a dataset from a trial measuring the subjects' pupils. There are many measurements, all of which must be analysed in a similar fashion; so if I get the analysis right for one of them, I've got them all. For simplicity, let us call any measurement we may be interested as

[R] overlapping moving windows

2011-02-07 Thread matteo_new
Dear all, I have a systematic and spatial organized matrix like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 in which every number is a species. I would create a moving overlapping window to resample, at

[R] Where command in ctree (party)

2011-02-07 Thread jdanielnd
Hello, I need to classify (i.e., export a vector with terminal node id's) new cases using a ctree (party package) model based on different cases (learning sample). I tried the where command with the following syntax: where(tree, newdata=data2) expecting to get terminal nodes of data2 cases

[R] Extract number from string

2011-02-07 Thread Roy Mathew
Dear R Users, if I have a string as follows x-jsda23tth How can I extract out 23 as a numeral? I found substr(x,5,6) but, this doesnt work if the number of alphabets differ. This is another example where the numbers need to be extracted. x-c(jsda23tth,fgd54fgd,j3ngh,gfdjh564) any ideas? This

Re: [R] [Rd] print(...,digits=2) behavior

2011-02-07 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11-02-07 03:56 AM, Martin Maechler wrote: Ben Bolker bbol...@gmail.com on Sat, 5 Feb 2011 15:58:09 -0500 writes: A bug was recently posted to the R bug database (which probably would better have been posted as a query here) as

Re: [R] aggregate function - na.action

2011-02-07 Thread Matthew Dowle
Hi Hadley, Does FAQ 1.8 answer that ok ? Ok, I'm starting to see what data.table is about, but why didn't you enhance data.frame in R? Why does it have to be a new package? http://datatable.r-forge.r-project.org/datatable-faq.pdf Matthew Hadley Wickham had...@rice.edu wrote in message

[R] Loop to find dates whithin dates

2011-02-07 Thread patraopedro
Hello to all, I have two dataframes, the first with two columns sunrise and sunset (for 10 years). Each of these columns is formatted for date time (ex: 01-Jan-2010 15:37:00) In the second data frame I have GPS information and also a date time column (same format ). What I would like to do is

Re: [R] how to efficiently extract elements of a list?

2011-02-07 Thread Duncan Murdoch
On 07/02/2011 10:13 AM, Sean Zhang wrote: Dear R helper, I wonder whether there is a quick way to extract some elements for a list. for a vector we can do the following vec- seq(3) names(vec)- LETTERS[1:3] vec[c(1,3)] vec[c('A','C')] But for a list, test.l-

Re: [R] Extract number from string

2011-02-07 Thread Gabor Grothendieck
On Mon, Feb 7, 2011 at 9:37 AM, Roy Mathew roymathe...@gmail.com wrote: Dear R Users, if I have a string as follows x-jsda23tth How can I extract out 23 as a numeral? I found substr(x,5,6) but, this doesnt work if the number of alphabets differ. This is another example where the numbers

Re: [R] can I use the output of a neural network as the fitness function of genetic algorithm?

2011-02-07 Thread Changbin Du
In SAS, you can output the parameter estimation related to fitness function, I dont know this in R. Once you have output from SAS, you can write down your function and feed them into optim in R to solve your problem. On Mon, Feb 7, 2011 at 5:00 AM, ying zhang ying.zh...@struq.com wrote: Hi

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread David Winsemius
set.seed sets the (pseudo-)random number generator in a predictable state so that you get the same table as I do when running the code, assuming you don't do any other calls to the RNG in the interim. 123 is kind of traditional as a seed for demonstration purposes, but in real analyses you

[R] problem in merging

2011-02-07 Thread taby gathoni
Hi all, I am having this error while trying to merge about 2 dataframes m_merge = merge(m_accts,m_op, by.y=CUST_ID,by.x=FORACID,all.y=TRUE,all.x=TRUE) Error: cannot allocate vector of size 10.0 Mb Taby [[alternative HTML version deleted]]

[R] Creating a list of lists / hclust elements

2011-02-07 Thread Lui ##
Dear group, I am currently struggling with the following problem for a while: I want to create a list whose elements consists of lists themselves. More concise: The list elements are HCLUST objects. However, when I try to append the HCLUST objects to my list via: cluster_list -

Re: [R] waveThresh plot axis

2011-02-07 Thread Mike Marchywka
Date: Mon, 7 Feb 2011 10:49:54 +0100 From: eva.a...@gmail.com To: r-help@r-project.org Subject: [R] waveThresh plot axis Dear, I am using WaveTresh for Haar Wavelets. It works all fine exept when I want to adjust the axis on the wavelet

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 10:45 AM, Lui ## wrote: Dear group, I am currently struggling with the following problem for a while: I want to create a list whose elements consists of lists themselves. More concise: The list elements are HCLUST objects. However, when I try to append the HCLUST objects

[R] question mle again

2011-02-07 Thread Antje Niederlein
A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and

[R] color2d.maplot error

2011-02-07 Thread Alaios
Dear all I am using color2D.maplot to map some matrixes to plot. everything works fine. It seems that when my matrix contains only the same value color2D.maplot returns the following error:

Re: [R] aggregate function - na.action

2011-02-07 Thread Hadley Wickham
Does FAQ 1.8 answer that ok ?   Ok, I'm starting to see what data.table is about, but why didn't you enhance data.frame in R? Why does it have to be a new package?   http://datatable.r-forge.r-project.org/datatable-faq.pdf Kind of. I think there are two sets of features data.table provides:

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread Daniel Nordlund
?subset Daniel Nordlund Bothell, WA USA -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of patraopedro Sent: Monday, February 07, 2011 6:11 AM To: r-help@r-project.org Subject: [R] Loop to find dates whithin dates Hello to

[R] Seeking help to define s4 method for 'print'

2011-02-07 Thread Bogaso Christofer
I have got another question on defining a method for print() function for my s4 class. Here is my class definition as well as what I have done till now: setClass(Me, representation(x1 = numeric, x2 = numeric, y1 = character)) [1] Me setMethod(print, Me, definition=function(x) { +

Re: [R] aggregate function - na.action/ performance issues re structs and algorithms

2011-02-07 Thread Mike Marchywka
From: had...@rice.edu Date: Mon, 7 Feb 2011 11:00:59 -0600 To: mdo...@mdowle.plus.com CC: r-h...@stat.math.ethz.ch Subject: Re: [R] aggregate function - na.action Does FAQ 1.8 answer that ok ? Ok, I'm starting to see what data.table is

Re: [R] question mle again

2011-02-07 Thread Joshua Wiley
Hi, On Mon, Feb 7, 2011 at 8:15 AM, Antje Niederlein niederlein-rs...@yahoo.de wrote: A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread Eik Vettorazzi
Hi Patrao, you can 'merge' both datasets using the (extracted) day as indicator, see ?merge. Then use subset. hth. Am 07.02.2011 15:10, schrieb patraopedro: Hello to all, I have two dataframes, the first with two columns sunrise and sunset (for 10 years). Each of these columns is

[R] Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)

2011-02-07 Thread Dimitri Liakhovitski
Hello! I was wondering if it's possible to see the actual code of checkTmvArgs function that is part of the code for rtmvnorm (which is below - I just typed rtmvnorm on the prompt). I get an error: Error in checkTmvArgs(mean, sigma, lower, upper) : sigma must be a symmetric matrix At the same

Re: [R] Seeking help to define s4 method for 'print'

2011-02-07 Thread Joshua Wiley
Hi Christofer, I think this might not be the best use of S4 methods (I am still at the constantly rereading the R extensions manual and John Chambers' book stage), but since you are just printing numeric class data, I would be tempted to use set it up so your method just passes it on to the

Re: [R] question mle again

2011-02-07 Thread Bert Gunter
On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi, When a function cannot find a variable inside its own environment, it will look to its parent environment. This is false. It will look to its **enclosing environment / enclosure . See ?environment (Note: This is

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Eik Vettorazzi Sent: Monday, February 07, 2011 9:26 AM To: patraopedro Cc: r-help@r-project.org Subject: Re: [R] Loop to find dates whithin dates Hi Patrao, you can 'merge'

Re: [R] tri-cube and gaussian weights in loess

2011-02-07 Thread Liaw, Andy
Locfit() in the locfit package has a slightly more modern implementation of loess, and is much more flexible in that it has a lot of options to tweak. One such option is the kernel. There are seven to choose from. Andy From: wisdomtooth From what I understand, loess in R uses the

Re: [R] question mle again

2011-02-07 Thread Joshua Wiley
On Mon, Feb 7, 2011 at 9:40 AM, Bert Gunter gunter.ber...@gene.com wrote: On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi, When a function cannot find a variable inside its own environment, it will look to its parent environment. This is false. It will look to

Re: [R] problem in merging

2011-02-07 Thread jim holtman
A little more information would be of use; e.g. str(m_accts) str(m_op) gc() # how much memory is currently being used Message indicates you may have fragmented memory and it can not find enough contigious space. Also do you have duplicates in the ID you are merging by so that you wind up with

Re: [R] problem in merging

2011-02-07 Thread jim holtman
simple example of what I was talking about; dataframe only size 5 but result is length 44 x1 - data.frame(a=sample(c(A, B), 5, TRUE), b=1:10) x2 - data.frame(a=sample(c(A, B), 5, TRUE), b=1:10) x1 a b 1 A 1 2 B 2 3 A 3 4 A 4 5 B 5 6 A 6 7 B 7 8 A 8 9 A 9 10 B 10 x2 a

Re: [R] question mle again

2011-02-07 Thread Gabor Grothendieck
On Mon, Feb 7, 2011 at 1:01 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: On Mon, Feb 7, 2011 at 9:40 AM, Bert Gunter gunter.ber...@gene.com wrote: On Mon, Feb 7, 2011 at 9:21 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi, When a function cannot find a variable inside its own environment,

Re: [R] question mle again

2011-02-07 Thread Prof Brian Ripley
Because, as that help page makes clear, the 'parent environment' is easily confused with the 'parent frame', we tend not to use the former. So the main answer to when/how is the the parent environment distinct from the enclosing environment? is 'when the writer meant the parent frame'. On

[R] p-value for y in non-parametric distribution, Y

2011-02-07 Thread Sascha Vieweg
Hello, knowing that some index y, with y(341)=2, SE=3, is t-distributed, I (think I) can find an appropriate (left/one-sided) p-value with R: y - 2 R: yse - 3 R: (p - 1-pt(y/yse, df=341)) Now, some simulation resulted in the non-parametric distribution, Y, of my index, y: R: Y -

[R] Unusual slowing of R matrix multiplication version 2.12.1 (2010-10-15) vs 2.12.0

2011-02-07 Thread Joseph Kunkel
R Version 2.12.1 (2010-10-15) vs 2.12.0 has slowed down 8 fold for dual core and 17 fold for dual-core-dual-processor Macs. I have checked this result on 3 different macs using the following R-script: Using Version 2.12.0 on a dual core dual processor Mac:

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread jim holtman
If you are looking to find out if a given GPS time is between sunrise/sunset, then here is what I would do given the quantity of data. I would encode the sunrise/sunset times in a character vector of length 10 years * 365 days/year * 1440 minutes/day = 5M character vector. Set the vector to '1'

[R] how to return multipy matrix in a function

2011-02-07 Thread zhaoxing731
Hello I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is there any method/function that return the max of every row and the subscript of maximum value simultaneously #define the function returnfunction-function(x){ + value-apply(x,1,max) + index-apply(x,1,which.max)

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread patraopedro
Thank you for your responses but I think whith some examples the problem will be better understated. Ok, here it is an example of how the data looks like to allow a better understanding of the problem. Dframe1 - data.frame(sunrise = seq(as.POSIXct(2010-07-14 06:05:25),as.POSIXct(2010-07-20

Re: [R] Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)

2011-02-07 Thread Dimitri Liakhovitski
I found a reason why I was getting the error that my var-covar matrix was not symmetric: because my column names and row names were different! Dimitri On Mon, Feb 7, 2011 at 12:39 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! I was wondering if it's possible to see the

Re: [R] Loop to find dates whithin dates

2011-02-07 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of patraopedro Sent: Monday, February 07, 2011 9:36 AM To: r-help@r-project.org Subject: Re: [R] Loop to find dates

Re: [R] aggregate function - na.action

2011-02-07 Thread Matthew Dowle
Hadley, That's fine; please do. I'm happy to explain it offline where the documentation or comments in the code aren't sufficient. It's GPL code so you can take it and improve it, or depend on it. Whatever works for you. As long as (of course) you don't stand on it's shoulders and then

Re: [R] how to return multipy matrix in a function

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 12:30 PM, zhaoxing731 wrote: Hello I have a 100*100 matrix which is from a intensive computation, e.g. mat. Is there any method/function that return the max of every row and the subscript of maximum value simultaneously #define the function

[R] under what conditions would rtmvnorm (from package tmvtnorm) produce all NaNs

2011-02-07 Thread Dimitri Liakhovitski
Hello! I am trying to generate a sample from a truncated multivariate normal distribution using rtmvnorm. I am using Gibbs because my alpha (line below) is teeny-tiny ( 4.083475e-64 ) alpha = pmvnorm(lower=lower, upper=upper, mean=btilde, sigma=MyVarCovar). When I try my Gibbs run, it takes

[R] package ChemometricsWithR

2011-02-07 Thread Pedro Mardones
Dear all; Does anyone knows where can I find the package ChemometricsWithR mentioned in http://www.springer.com/life+sciences/bioinformatics/book/978-3-642-17840-5? Thanks for any hint PM [[alternative HTML version deleted]] __

Re: [R] package ChemometricsWithR

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 2:31 PM, Pedro Mardones wrote: Dear all; Does anyone knows where can I find the package ChemometricsWithR mentioned in http://www.springer.com/life+sciences/bioinformatics/book/978-3-642-17840-5? Thanks for any hint The preface says: With the book comes a package, too:

Re: [R] Giving vector of colors to line in plots

2011-02-07 Thread statmobile
On 02/07/2011 02:15 AM, Jinsong Zhao wrote: On 2011-2-7 14:15, statmobile wrote: set.seed(33) x - rpois(7,lambda=7) y - rpois(7,lambda=5) cols.x - c(rep(black,2),rep(red,3),rep(black,2)) cols.y - c(rep(blue,3),rep(yellow,2),rep(blue,2)) points.x - c(rep(x,2),rep(O,3),rep(x,2)) points.y -

Re: [R] delete rows

2011-02-07 Thread Robert Baer
Assuming your data is in a dataframe called df: # make fake df df = data.frame(a=1:472, b=1001:1472) df[416:472, ] # check the rows you want to remove df[-(416:472), ] # remove them df # see what's left -- From: Christopher Porter

Re: [R] question mle again

2011-02-07 Thread Ben Bolker
Antje Niederlein niederlein-rstat at yahoo.de writes: A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: I will point

Re: [R] Unbalanced Mixed Linear Models With Nested Stratum

2011-02-07 Thread Ben Bolker
JaFF el.romaro at gmail.com writes: Hi folks, I have a dataset from a trial measuring the subjects' pupils. There are many measurements, all of which must be analysed in a similar fashion; so if I get the analysis right for one of them, I've got them all. For simplicity, let us call

[R] Combining the results from two simple linear regression models

2011-02-07 Thread Patrick McKann
Hi all. This is more of a stats question, I suppose. Let's say I have two separate simple regressions of weight on year from two different datasets. I want to combine the regressions so that I can come up with a single equation for the total weight regressed on year. In reality, there is

[R] fast optimization routines in R

2011-02-07 Thread ppinger
Dear R help archive group, I am looking for a maximization routine that I can use to maximize a large variety of relatively complex likelihoods. I undertand (from previous posts) that coding the objective function more efficiently can help. However, the optimization routine employed seems

[R] circular

2011-02-07 Thread Bobby Lee
Hi, I'm new to R. I'm trying to plot my data into a circle. my data sort of looks like 12,12,4,5,6,5,11,10,3,9,9,9,12,12,2 total of 15 numbers. I'm trying to add all the same numbers, such that, there are 4 of 12s,1 of 11, 1 of 10, 3 of 9s, and such so the circle plot would have 4 parts of 12,

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread Lui ##
Hi David, I tried this one, but unfortunately it didn't solve the problem (same result as append). Thank you very much for your suggestion! Lui On Mon, Feb 7, 2011 at 5:14 PM, David Winsemius dwinsem...@comcast.net wrote: On Feb 7, 2011, at 10:45 AM, Lui ## wrote: Dear group, I am

Re: [R] circular

2011-02-07 Thread Eik Vettorazzi
Hi, does y-c(12,12,4,5,6,5,11,10,3,9,9,9,12,12,2) pie(table(y)) suits you? Where does circular come from? Am 07.02.2011 21:20, schrieb Bobby Lee: Hi, I'm new to R. I'm trying to plot my data into a circle. my data sort of looks like 12,12,4,5,6,5,11,10,3,9,9,9,12,12,2 total of 15 numbers.

[R] rjava does not install

2011-02-07 Thread servet cizmeli
I am on a fedora server on which I am not root privileges. I am trying to locally install rJava... Here are my steps : $uname -a Linux 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux $ java -version java version 1.6.0_22 Java(TM) SE Runtime Environment

[R] 3D plots

2011-02-07 Thread danieladna
Hi, Which package is your favorite one to create 3D bar plots? Which package is the easiest and fastest to use to your mind? I tried to download the R.basic package that has plot3d integrated. Unfortunately the installation from Henrik's webpage doesn't work. Do you know where else to get it

[R] kernel density

2011-02-07 Thread garciap
Hi all (again), many thanks for the answer to the optimization problem. All is fine now. The problem now is with kernel estimators in sm. package. I do all the work and the graphics good, but I need the density function data for each point, and I don't know how to get it. The only thing I get is

[R] Four paramete logistics.

2011-02-07 Thread Ramya
Hi, I have to do a four point logistics for a dataset. All I have is the absorbance value for different proteins and need to get the four Point values. I have no idea where to start. Any suggestions would be much helpful. Thanks Ramya -- View this message in context:

[R] Weighted Curve fitting - esp. logarithmic

2011-02-07 Thread John Protzko
I am trying to run a curve fit on a regression. The problem is I need to do a weighted curve fitting. Also I believe the best fitting curve is likely to be a logarithmic one, but I also need to figure out how to adjust the properties of different logarithmic curves (different bases, rates of

Re: [R] Creating a list of lists / hclust elements

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 4:13 PM, Lui ## wrote: Hi David, I tried this one, but unfortunately it didn't solve the problem (same result as append). Thank you very much for your suggestion! Then give you elements names: cluster_list - list( cl.lst=cluster_list, Hcobj=HCLUSTobject) Lui On Mon,

Re: [R] package ChemometricsWithR

2011-02-07 Thread Pedro Mardones
That's true but also says: The corresponding R code is provided for all the examples in the book; scripts, functions and data are available in a separate, publicly available R packageso I was assuming that the package was available in CRAN. Thanks anyway. PM On Mon, Feb 7, 2011 at 4:55 PM,

Re: [R] fast optimization routines in R

2011-02-07 Thread Ravi Varadhan
Try the optimx package. It is ideal for doing comparative performance evaluations of different optimizers for box-constrained problems. It unifies about a dozen algorithms under a single function call that is almost identical to that of `optim'. You need to set the control option as

Re: [R] 3D plots

2011-02-07 Thread Duncan Murdoch
On 11-02-07 5:31 PM, danieladna wrote: Hi, Which package is your favorite one to create 3D bar plots? Which package is the easiest and fastest to use to your mind? I tried to download the R.basic package that has plot3d integrated. Unfortunately the installation from Henrik's webpage doesn't

Re: [R] Subsampling out of site*abundance matrix

2011-02-07 Thread B77S
So, after thinking about this a bit, I realized that the previous solution wasn't exactly what I needed. I really needed replacement=F and to be able to choose any sample size (n.sample) less than or equal to the site (row) with the lowest total abundance. Anyway, I think this works.

Re: [R] package ChemometricsWithR

2011-02-07 Thread David Winsemius
On Feb 7, 2011, at 6:26 PM, Pedro Mardones wrote: That's true but also says: The corresponding R code is provided for all the examples in the book; scripts, functions and data are available in a separate, publicly available R packageso I was assuming that the package was available

[R] Using Aggregate for Date

2011-02-07 Thread Belle
Hi, I am trying to find the min of day for each student in each year. Here is the dataset: date studentid year 1/1/05 6:07 AM 236 20082009 3/27/09 9:45 AM 236 20082009 4/29/09 8:44 AM 236 20082009

Re: [R] Using Aggregate for Date

2011-02-07 Thread Phil Spector
Belle - Assuming that by=list(mydata$schoolid, mydata$year) was a typo and should have been by=list(mydata$studentid, mydata$year), setting class(day_min$x) = 'POSIXct' day_min$x = format(day_min$x,'%m/%d/%y %l:%M %p') should make the mininum days display in the format you want.

Re: [R] Using Aggregate for Date

2011-02-07 Thread Belle
Phil, Thanks a lot, it works well. -- View this message in context: http://r.789695.n4.nabble.com/Using-Aggregate-for-Date-tp3265417p3265469.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

  1   2   >