Re: [R] Simulating data (stupid question)

2009-08-25 Thread Liviu Andronic
Hello Your attachement didn't seem to get through. You can simulate data using rnorm() or any of the r*() functions [1]. You can also use it to add noise to a custom function that you use to generate your specific data. Liviu [1] http://www.statmethods.net/management/functions.html On 8/25/09,

Re: [R] Combining matrices

2009-08-25 Thread Gabor Grothendieck
My prior solution was not correct. If the idea is to combine each row of x with each row of y then convert the matrices to data frames and perform and outer join with SQL like this: library(sqldf) X - as.data.frame(x) Y - as.data.frame(y) as.matrix(sqldf(select * from X, Y, method = raw)) See

Re: [R] R with MPI

2009-08-25 Thread Martin Morgan
Hi Polemon -- polemon wrote: On Mon, Aug 24, 2009 at 2:20 PM, polemon pole...@gmail.com wrote: Hello, I plan to use R with my cluster with OpenMPI. I need the packaged 'snow' and 'Rmpi' for that, however, I get an error while downloading and installing them: When I do a:

[R] how to apply a date format for data frame

2009-08-25 Thread rajclinasia
Hi Everyone, i have a data frame like this labels starts ends priorities 1 firsttask 37987 38049 1 2 secondtask 38019 38112 2 3 thirdtask 38049 38144 3 4 fourthtask 38081 38207 4 5 fifthtask 38112 38239 5 now i want to apply a date

[R] comparing tables from replicated data

2009-08-25 Thread Troels Ring
Dear friends, I'm examining the characteristics of two models that both fit the sodium concentration in 16 pigs quite well under treatment or control conditions. The more complicated model is by anova better than the less complicated model. To take it further I have generated replicate data

Re: [R] vector size: Fixed

2009-08-25 Thread ogbos okike
Hi Uwe, I am pleased to inform you that this problem has, following your hint, been resolved. I installed 64-bit version of R and I was alright. Thanks again for your time. Ogbos 2009/6/24 Uwe Ligges lig...@statistik.tu-dortmund.de ogbos okike wrote: Hi, I have a data of size

Re: [R] robust method to obtain a correlation coeff?

2009-08-25 Thread Christian Meesters
Hi, Thanks for all the answers. Think with your help I got it now. It was apparently a typical newbie question. I'll try omitting NAs globally in this case. Thanks, Christian __ R-help@r-project.org mailing list

Re: [R] how to apply a date format for data frame

2009-08-25 Thread Uwe Ligges
rajclinasia wrote: Hi Everyone, i have a data frame like this labels starts ends priorities 1 firsttask 37987 38049 1 2 secondtask 38019 38112 2 3 thirdtask 38049 38144 3 4 fourthtask 38081 38207 4 5 fifthtask 38112 38239 5 now i

Re: [R] Filling in empty arrays/lists from using paste function

2009-08-25 Thread Uwe Ligges
I highly suggest to rethink your problem in a way that you store the things labelled, e.g., TA1 to TA5 (as well as all the others) as the elements of a list TA. This way you have just one object TA that can easily be accessed by index operations and the code looks much cleaner in the end.

Re: [R] Between-group variance from ANOVA

2009-08-25 Thread Mark Difford
Hi Emma, ...from this I can read the within-group variance. can anyone tell me how i may find out the between-group variance? But it's in the table, above the within-group variance. Remember that F is the ratio of these two quantities, i.e. the mean of the group variances divided by the

Re: [R] how to apply a date format for data frame

2009-08-25 Thread Stefan Grosse
On Mon, 24 Aug 2009 23:42:11 -0700 (PDT) rajclinasia r...@clinasia.com wrote: R labels starts ends priorities R 1 firsttask 37987 38049 1 It is easier with the other data.frame you had with: labels starts ends 1 first task 1-Jan-04 3-Mar-04 and as.Date see

Re: [R] problem with BRugs

2009-08-25 Thread Uwe Ligges
R Heberto Ghezzo, Dr wrote: Hello, I am sorry, I have this problem before and Uwe send me the answer but I misplaced it Oh dear! But it is not lost, since the answer to the second part of your problem was: Please read the documentation! and can not find it. writing a model for BRugs

[R] Re : table function

2009-08-25 Thread Inchallah Yarab
Hi Mark, Thank you for your answer !! it works but if i have NA in the vector z what i shoud do to count its number in Z? x      y        z 1    0      100 5    1      1500 6    1  NA 2    2      500 1    1  NA 5    2    2000 8    5    4500 i did the same but it gives me this

Re: [R] Between-group variance from ANOVA

2009-08-25 Thread Mark Difford
Hi Emma, ... I forgot to add the tabular ouput, which doesn't help either: T.sum - summary(aov(response ~ group, data=TDat)) print(T.sum) Df Sum Sq Mean Sq F valuePr(F) group 1 11225.2 11225.23084 2.2e-16 *** Residuals 198 720.7 3.6

[R] table function

2009-08-25 Thread Inchallah Yarab
Hi Mark, Thank you for your answer !! it works but if i have NA in the vector z what i shoud do to count its number in Z? x      y        z 1    0      100 5    1      1500 6    1  NA 2    2      500 1    1  NA 5    2    2000 8    5    4500 i did the same but it gives me this

Re: [R] MSM package and qmatrix

2009-08-25 Thread Peter Adamson
Hi Ross, For an eleven state model you could define transitions as follows: transitions_allowed - matrix(c( 0,1,1,1,1,1,1,1,1,1,1, 1,0,1,1,1,1,1,1,1,1,1, 1,1,0,1,1,1,1,1,1,1,1,

Re: [R] hdf5 package segfault when processing large data

2009-08-25 Thread Marcus Daniels
Hi Budi and Bill, As a workaround, you could try setting your stack limit to a larger limit (ulimit -s). I'll change that to a heap allocation. Thanks, Marcus William Dunlap wrote: This is probably due to the code in hdf5.c allocating a huge matrix, buf, on the stack with 883

[R] order of effects plot panels

2009-08-25 Thread mcobb_berkeley
I can't figure out how to customize the order of the panels for effects plots. Any help would be appreciated. Here's my code: library(effects) lm.hour3eff-allEffects(lm.hour3, xlevels=list(road=c(0, 1000, 2000, 3000), trail=c(0, 1000, 2000, 3000))) plot(lm.hour3eff,road:trail, xlab=Trail

[R] Monotone Smoothing specifically I splines

2009-08-25 Thread Helen Powell
Hello I am looking for a function to create an Integrated (I) spline basis, somehting similar to the likes of 'bs' and 'ns'. I have come across the funcitons, fda::eval.monfd Values of a Monotone Functional Data Object fda::/.fd FDA internal functions fda::monfn

Re: [R] Between-group variance from ANOVA

2009-08-25 Thread emj83
can anyone advise me please? emj83 wrote: I have done some ANOVA tables for some data that I have, from this I can read the within-group variance. can anyone tell me how i may find out the between-group variance? Thanks Emma -- View this message in context:

[R] allowing line wrap for long strip text in xyplot (lattice)

2009-08-25 Thread Donald Boyd
Hi. Am brand new to R and to mailing lists - have never posted anywhere before, so hope I do this right. Am using R 2.9.1 with lattice graphics (just installed, fully up to date). Am doing trellis xyplot with y (emp=employment), x (yearmo=a time measure) and conditioning variable (indf - factor

[R] Number of CPU's

2009-08-25 Thread Håvard Rue
Any way to get access to the number of CPU's, optionally their type, from within R? In linux I can just read /proc/cpuinfo but for win/mac ? Thanks! Håvard -- Håvard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice:

[R] Fw: Re: Simulating data for sampling (stupid question)

2009-08-25 Thread KABELI MEFANE
Dear All   I know that you do not have to help me (as this is not a pure R problem) but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a

[R] Filling matrix secondary diagonal

2009-08-25 Thread Vaupo
Hi, how do i fill the secondary diagonals of a matrix? Is there an funktion like the diag funktion in matlab, where i can specify the diagonal i´d like to fill? -- View this message in context: http://www.nabble.com/Filling-matrix-secondary-diagonal-tp25121745p25121745.html Sent from the R

Re: [R] Between-group variance from ANOVA

2009-08-25 Thread emj83
I have done this in R and this is the following ANOVA table I get: summary(aov(response ~ group, data=TDat)) Df Sum Sq Mean Sq F valuePr(F) group 1 11203.5 11203.5 2505.0 2.2e-16 *** Residuals 198 885.5 4.5 The model is response(i,j)= group(i)+ error(i,j),

[R] Creating a simple line graph

2009-08-25 Thread PDXRugger
Hey everyone, Sorry for yet another simple question but hopefully it makes whoever comes up with the answer feel good about helping others. I would like to simply plot the following two sets of data in a line graph. The one set is an observed set of points and the latter is the predicted.

Re: [R] Saving heatmaps as PDFs

2009-08-25 Thread dorothyc
Hi, I'm trying to save heatmaps as PDFs. However, the PDF version of the heatmaps (Heatmap_CAFvsTNF_run2.pdf) is blurred when compared to its counterpart, which was saved manually by using the software Grab (Heatmap_CAFvsTNF_run2.tiff). -R code sample_output -

[R] Fw: Re: Simulating data (stupid question)

2009-08-25 Thread KABELI MEFANE
Dear All   I know that you do not have to help me (as this is not a pure R problem) but please do, i am new to R as a CPI compiler, i just need to do a sample to see which sampling method best works in different situations, therefore since this is for practice purposes nobody will finance a

Re: [R] How to create a random matrix

2009-08-25 Thread Tal Galili
Here is another nice way of doing it: replicate(10, rnorm(20)) # this will give you 10 columns of vectors with 20 random variables taken from the normal distribution. If any one got a faster way of doing this, please let me know. Tal galili On Tue, Aug 25, 2009 at 1:30 AM, Rolf Turner

[R] [] for R

2009-08-25 Thread kfcnhl
I am assuming the variable out is the output parameter. However, I don't understand what is out[1+xi*xx0]? Can someone explain this to me? Thanks in advance, Chen dGEV - function(x, xi, mu = 0, sigma = 1, logvalue=FALSE) { xx - (x-mu)/sigma #use the new dGumbel which passes mu and

Re: [R] Creating a simple line graph

2009-08-25 Thread Liviu Andronic
Hello I couldn't quite understand exactly what graph you are looking for, so I'd be unable to provide code. Couple of pointers, though. - Put your data into a data frame and look at Rcmdr Graphs menu. It can do many types of them, and it should give you enough examples to get started with. - Try

Re: [R] [Rd] Formulas in gam function of mgcv package

2009-08-25 Thread Corrado
Dear Gavin / Rlings, thanks for your kind answer and sorry for posting to the dev mailing list. Concerning the specific of your answer: I am working with 6 to 36 covariates, and they are all centred and scaled. I represented the problem with two variables to simplify the question. So ideally,

[R] Odp: Re : table function

2009-08-25 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.08.2009 10:08:36: Hi Mark, Thank you for your answer !! it works but if i have NA in the vector z what i shoud do to count its number in Z? You do not have NA in z, you manage to convert it somehow to factor. Please try to read about data

Re: [R] Saving heatmaps as PDFs

2009-08-25 Thread Tal Galili
Try playing with the width, height of the pdf() Tal On Tue, Aug 25, 2009 at 2:04 AM, dorothyc dorot...@bcgsc.ca wrote: Hi, I'm trying to save heatmaps as PDFs. However, the PDF version of the heatmaps (Heatmap_CAFvsTNF_run2.pdf) is blurred when compared to its counterpart, which was

[R] Odp: Fw: Re: Simulating data for sampling (stupid question)

2009-08-25 Thread Petr PIKAL
Well you shall consult (surprisingly :-) ?sample function and for rating ?runif function as was pointed out earlier Regards Petr r-help-boun...@r-project.org napsal dne 25.08.2009 05:14:00: Dear All  I know that you do not have to help me (as this is not a pure R problem) but

[R] Re : Odp: Re : table function

2009-08-25 Thread Inchallah Yarab
  Thank you Peter, in my vector Z i have missing value NA and i want to count its number in the vector i had did alla this i know the difference between a numeirc and a factor the goal of this exercice that to count the number of missing value, number betwwen 0-1000 , 1000-3000, 3000. Thank

Re: [R] Creating a simple line graph

2009-08-25 Thread Petr PIKAL
Hi Do not use cbind as it results in matrix and it can have only data of one type, in your case character. Use MeanEst2000.Sz=data.frame(Sz,Pred) instead. And you probably could go step further to put everything into one data frame DF - data.frame(Sz,Pred, Obs) then with(DF, plot(Pred,

Re: [R] Help on comparing two matrices

2009-08-25 Thread Michael Kogan
David: Ah, so that was the reason! I didn't realize that. :) Ok, so I try to go through the code and understand it: The last line seems to bring the rows into the order given by the order command. But how does the order command get the order? Lets look into the order function: the Reduce

[R] latitude and longitude distribution

2009-08-25 Thread ogbos okike
Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that distribution of latitude and longitude will give number of lightning occurrence in a region. I have used factor function to sum up the number of events on latitude and longitude axis and saved as

[R] Odp: Re : Odp: Re : table function

2009-08-25 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.08.2009 11:28:31: Â Thank you Peter, in my vector Z i have missing value NA and i want to count its number in the vector i had did alla this i know the difference between a numeirc and a factor OK. If you know difference between factor and

Re: [R] problem with BRugs

2009-08-25 Thread Vitalie S.
Hello Uwe, Just a related question, OpenBugs is using C and T for Censoring and Truncation. But this does not seem to work with BRugs. I am using this document http://mathstat.helsinki.fi/openbugs/Manuals/ModelSpecification.html#TheBUGSLanguageStochasticNodes Thanks, Vitalie. On Tue, 25

Re: [R] [] for R

2009-08-25 Thread Vitalie S.
see ?[ For '['-indexing only: 'i, j, ...' can be logical vectors, indicating elements/slices to select. Such vectors are recycled if necessary to match the corresponding extent. 'i, j, ...' can also be negative integers, indicating

Re: [R] robust method to obtain a correlation coeff?

2009-08-25 Thread Martin Maechler
JK == John Kane jrkrid...@yahoo.ca on Mon, 24 Aug 2009 10:01:56 -0700 (PDT) writes: JK I may be misunderstanding the question but would cor(d1, JK use='complete.obs') or some other variant of use help? Yes! I've been a bit appalled to read that nobody else gave this (in my view

Re: [R] problem with BRugs

2009-08-25 Thread Uwe Ligges
Vitalie S. wrote: Hello Uwe, Just a related question, OpenBugs is using C and T for Censoring and Truncation. But this does not seem to work with BRugs. I am using this document http://mathstat.helsinki.fi/openbugs/Manuals/ModelSpecification.html#TheBUGSLanguageStochasticNodes What's

[R] table, sum, cat function

2009-08-25 Thread Inchallah Yarab
Hi, the second step in my exercice is to calculate the sum of the amout for each class et not the frequency i have this vector x   y 1  100 2  1500 3  3250 4  6250 5  2000 6   450 i want to use the function table and cat to calculate

[R] Re : Odp: Re : Odp: Re : table function

2009-08-25 Thread Inchallah Yarab
Thank you very much Peter it works!! the second step is to calculate the sum of variable in each class!!! how can i do this!!! thank you in advance inchallah De : Petr PIKAL petr.pi...@precheza.cz Cc : r-help@r-project.org Envoyé le : Mardi, 25 Août

Re: [R] error in creating gantt chart.

2009-08-25 Thread Jim Lemon
rajclinasia wrote: hi every one, i have a excel sheet like this labels starts ends 1 first task 1-Jan-04 3-Mar-04 2 second task 2-Feb-04 5-May-04 3 third task 3-Mar-04 6-Jun-04 4 fourth task 4-Apr-04 8-Aug-04 5 fifth task 5-May-04 9-Sep-04 now i converted this excel sheet into

Re: [R] image plot

2009-08-25 Thread Jim Lemon
ogbos okike wrote: Hi, I am trying to use the image function to do a color plot. My matrix columns are labeled y and x. I tried image(y, x) but I had error message (Error in image.default(y, x) : increasing 'x' and 'y' values expected). Could anybody please tell me how to add these increasing

Re: [R] table, sum, cat function

2009-08-25 Thread Richard . Cotton
the second step in my exercice is to calculate the sum of the amout for each class et not the frequency i have this vector x y 1 100 2 1500 3 3250 4 6250 5 2000 6 450 i want to use the function table

Re: [R] Passing a list object to lapply

2009-08-25 Thread Uwe Ligges
Fowler, Mark wrote: Hello, I'm having difficulty passing an object name to a lapply function. Can somebody tell me the trick to make this work? lapply() works on objects rather than names of objects, hence you need get(paste(...)). Uwe Ligges #Works T13702 -

Re: [R] latitude and longitude distribution

2009-08-25 Thread milton ruser
Hi there, How about you send a minimum reproducible code as suggested on posting guide :-) bests milton On Tue, Aug 25, 2009 at 5:48 AM, ogbos okike ogbos.ok...@gmail.com wrote: Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that

Re: [R] How to create a random matrix

2009-08-25 Thread milton ruser
Like tris: NCols=5 NRows=7 myMat-matrix(runif(NCols*NRows), ncol=NCols) myMat bests milton On Mon, Aug 24, 2009 at 6:17 PM, Peng Yu pengyu...@gmail.com wrote: Hi, I did a search but I was able to find how to generate a random matrix. Can somebody let me know how to do it? Regards,

Re: [R] [] for R

2009-08-25 Thread Liviu Andronic
On 8/24/09, kfcnhl zhengchenj...@hotmail.com wrote: I am assuming the variable out is the output parameter. However, I don't understand what is out[1+xi*xx0]? Can someone explain this to me? http://www.statmethods.net/management/subset.html Liviu

Re: [R] Horisontal line in xtable

2009-08-25 Thread Liviu Andronic
Late answer, but still.. On 6/17/09, christiaan pauw cjp...@gmail.com wrote: I want a horisontal line that separates the results from the sample information i.e. a horisontal line on the bottom of the line second from last ?print.xtable hline.after: When 'type=latex', a vector of numbers

Re: [R] problem with BRugs

2009-08-25 Thread Vitalie S.
On Tue, 25 Aug 2009 12:13:21 +0200, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Vitalie S. wrote: Hello Uwe, Just a related question, OpenBugs is using C and T for Censoring and Truncation. But this does not seem to work with BRugs. I am using this document

Re: [R] problem with BRugs

2009-08-25 Thread Uwe Ligges
Vitalie S. wrote: On Tue, 25 Aug 2009 12:13:21 +0200, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Vitalie S. wrote: Hello Uwe, Just a related question, OpenBugs is using C and T for Censoring and Truncation. But this does not seem to work with BRugs. I am using this document

[R] xtable longtable with caption on top

2009-08-25 Thread Liviu Andronic
Dear all I would like to export a matrix to a LaTeX longtable environment that would have its caption on top of the table. However xtable() seems to bar me from doing this: print(xtable(mtcars[1:10,c(1,2)], caption=CARS), + tabular.environment=longtable, caption.placement=top + , floating=F) %

Re: [R] latitude and longitude distribution

2009-08-25 Thread Jim Lemon
ogbos okike wrote: Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that distribution of latitude and longitude will give number of lightning occurrence in a region. I have used factor function to sum up the number of events on latitude and

[R] Partykit Document

2009-08-25 Thread indranil basu
Hi All, I'm a newcomer to the R community, just started learning R. I need to use partykit for developing CART. But I'm not getting any document/help for using partykit/rpart. http://www.agrocampus-ouest.fr/math/useR-2009/slides/Hothorn+Zeileis.pdfgives some example, but it doesn't tell

Re: [R] Filling matrix secondary diagonal

2009-08-25 Thread Henrique Dallazuanna
Try this: m - matrix(sample(9), 3) diag(m) diag(m[-1,]) diag(m[,-1]) On Mon, Aug 24, 2009 at 4:03 PM, Vaupo m-va...@web.de wrote: Hi, how do i fill the secondary diagonals of a matrix? Is there an funktion like the diag funktion in matlab, where i can specify the diagonal i´d like to

[R] Odp: table, sum, cat function

2009-08-25 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 25.08.2009 12:07:11: Hi, the second step in my exercice is to calculate the sum of the amout for each class et not the frequency i have this vector x y 1 100 2 1500 3 3250 4 6250 5

[R] FW: Pec Function in R - syntax

2009-08-25 Thread K F Pearce
Hello everyone - sorry, I forgot to add the syntax for my program in the last message: My syntax is as follows: library(Hmisc) library(survival) library(pec) AL-read.table(PredErr2.txt,header=TRUE) Models-list(Kaplan.Meier=survfit(Surv(OVS,dead)~1,data=AL),EBMT+SN

[R] mixed normal distriburtion

2009-08-25 Thread mahdiyeh
I'm trying to draw the density function of a mixed normal distribution in the form of: .6*N(.4,.1)+ .4*N(.8,.1) At first I generate a random sample with size 200 by the below code: means = c(.4,.8) sds = sqrt(c(.1,.1)) ind = sample(1:2, n, replace=TRUE, prob=c(.6,.4))

[R] Pec function in R

2009-08-25 Thread K F Pearce
Hello everyone, These are some questions about the 'pec' function in R. These questions deal with prediction error curves and their derivation. Prediction error curves are documented in, for example, Efron-type measures of prediction error for survival analysis by Gerds and Schumacher. I

Re: [R] problem with BRugs

2009-08-25 Thread Vitalie S.
This is a BUGS error message that indeed tells you that BUGS cannot truncate that density - not related to R at all. Best, Uwe Ligges Yes, indeed, that does not work in OpenBugs as well. Means that documentation of Open bugs is incorrect (they are using dnorm there). Also I works

[R] multiple expressions in a legend

2009-08-25 Thread Michael Cho
Hi, Trying to do something fairly simple. I'm trying to get a legend that combines superscripts with a sequence, like this: r^2 = 1 r^2 = 2 r^2 = 3 ... Except that r^2 is properly formatted as a superscript. I've been playing with substitute and expression and can get an individual line to

[R] converting a matrix into a fn

2009-08-25 Thread maram salem
Dear All, I have a matrix m of the form  m     [,1] [,2]   [1,]  9072.302 0.0004462366   [2,]  9086.811 0.0005628169   [3,]  9101.320 0.0007126347   [4,]  9115.830 0.0008986976   [5,]  9130.339 0.001126   [6,]  9144.848 0.0014018405   [7,]  9159.357

[R] formats

2009-08-25 Thread rajclinasia
Hi every one, what do you mean by %d-%b-%y. is it reading format or writing format. Thanks in Advance. -- View this message in context: http://www.nabble.com/formats-tp25133503p25133503.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] multiple expressions in a legend

2009-08-25 Thread Gabor Grothendieck
Try this: plot(0) ix - as.double(1:3) legend(top, as.expression(lapply(ix, function(i) bquote(r^.(i) On Tue, Aug 25, 2009 at 8:45 AM, Michael Chore...@channing.harvard.edu wrote: Hi, Trying to do something fairly simple.  I'm trying to get a legend that combines superscripts with a

Re: [R] mixed normal distriburtion

2009-08-25 Thread Richard . Cotton
I'm trying to draw the density function of a mixed normal distribution in the form of: .6*N(.4,.1)+ .4*N(.8,.1) At first I generate a random sample with size 200 by the below code: means = c(.4,.8) sds = sqrt(c(.1,.1)) ind = sample(1:2, n, replace=TRUE, prob=c(.6,.4))

[R] Elastic net in R (enet package)

2009-08-25 Thread Alex Roy
Dear R users, I am using enet package in R for applying elastic net method. In elastic net, two penalities are applied one is lambda1 for LASSO and lambda2 for ridge ( zou, 2005) penalty. But while running the analysis, I realised tht, I optimised only one lambda. ( even

Re: [R] formats

2009-08-25 Thread Richard . Cotton
what do you mean by %d-%b-%y. is it reading format or writing format. %d-%b-%y is a date format - see the help page for strptime. Example usage: strptime(01-Jan-84, %d-%b-%y) strftime(Sys.time(), %d-%b-%y) Regards, Richie. Mathematical Sciences Unit HSL

Re: [R] problem with BRugs

2009-08-25 Thread Uwe Ligges
Vitalie S. wrote: This is a BUGS error message that indeed tells you that BUGS cannot truncate that density - not related to R at all. Best, Uwe Ligges Yes, indeed, that does not work in OpenBugs as well. Means that documentation of Open bugs is incorrect (they are using dnorm

Re: [R] Re : Odp: Re : Odp: Re : table function

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 6:25 AM, Inchallah Yarab wrote: Thank you very much Peter it works!! the second step is to calculate the sum of variable in each class!!! how can i do this!!! ?table ?xtab De : Petr PIKAL petr.pi...@precheza.cz Cc :

Re: [R] Help on comparing two matrices

2009-08-25 Thread Gabor Grothendieck
They can be regarded as incidence matrices rather than adjacency matrices and in that case it follows: library(igraph) # incidence matrix to canonical edge list inc2canel - function(m) { g - graph.incidence(m) cp - canonical.permutation(g) can - permute.vertices(g,

Re: [R] Help on comparing two matrices

2009-08-25 Thread Steve Lianoglou
Hi, It looks like you're getting more good stuff, but just to follow up: On Aug 24, 2009, at 4:01 PM, Michael Kogan wrote: Steve: The two matrices I want to compare really are graph matrices, just not adjacency but incidence matrices. There should be a way to get an adjacency matrix of a

Re: [R] Help on comparing two matrices

2009-08-25 Thread Michael Kogan
Gabor: Wow, that seems to be exactly what I need! Does it matter that my incidence matrices represent neighborhood relations between vertices and faces rather than between vertices and edges? Steve: Yep, I realize that this package is exactly what I'm searching for. :) Gabor Grothendieck

[R] Lattice graph tweaking

2009-08-25 Thread Wallis, David
To: silwood-r Subject: Removing lattice graph gridlines and editing label box colour Hi, Is it possible to remove the background gridlines from a lattice graph (ie graph made up of multiple individual graphs with annoying blue grid in the backgroun)? Also, Is it possible to change the colour

Re: [R] Lattice graph tweaking

2009-08-25 Thread Sundar Dorai-Raj
A reproducible example would be nice. Try grid = FALSE for the first question, though I'm unaware which lattice plot you are using where the default is TRUE. So I can't guarantee that will even work. For your second question, add par.settings = list(strip.background = list(col = white)) to

[R] Plotting the Log-Likelihood

2009-08-25 Thread enrico.fosco...@libero.it
Dear Users, I would like to plot the log-likelihood (depending on two parameters). I wrote the following code: library(mvtnorm) sigma- matrix(c(4,2,2,3),ncol=2) x-rmvnorm(n=500,mean=c(1,2),sigma=sigma) likel- function(param,data){

[R] MASS: lda collinearity

2009-08-25 Thread Jo Etzel
I am trying to understand what the lda function in the MASS package calculates when there are more dimensions than examples. It is my understanding that the Fisher Linear Discriminant is not applicable in this case, because the inverse of the covariance matrix cannot be calculated. My

Re: [R] Problems with loading 'wordnet' in a standalone pc

2009-08-25 Thread Kelvin Lam
Thanks Uwe. The wordnet is working now. My previous configuration that causes the error was: R - version 2.9.1 wordnet - version 0.1-4 rJava 0.6-2 After updating rJava to version 0.7-0 everything works now. Uwe Ligges-3 wrote: Looks like nobody answered so far: Kelvin Lam wrote:

Re: [R] Removing objects from workspace

2009-08-25 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ronggui Huang Sent: Monday, August 24, 2009 9:26 PM To: Steven Kang Cc: r-help@r-project.org Subject: Re: [R] Removing objects from workspace It depends. If there are

[R] Help in plotting a legend

2009-08-25 Thread Ashutosh Nandeshwar
Hello, List, I am a new user of the R project, and I need some help in plotting a legend. I am using the PBSmapping library to plot map of Ohio and heat color it with the count of employees in each county. As a guide, I am using Data Mashups in R. I am able to plot the map with the colors;

Re: [R] Help in building new function

2009-08-25 Thread Ana Paula Mora
It worked perfectly. Thanks a lot. On Mon, Aug 24, 2009 at 4:16 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: 1. Just enter arima at the R console to see its source code (without comments). The source tar.gz for R is found by googling for R, clicking on CRAN in left column and

[R] seeking tutor on statistical learning and data-mining

2009-08-25 Thread Luna Laurent
(posting for my friend) Hi all, We are looking for a tutor who could teach me statistical learning and data-mining using the book: The Elements of Statistical Learning: Data Mining, Inference, and Prediction Please drop me a line if you are interested. Thank you! [[alternative HTML

Re: [R] Lattice graph tweaking

2009-08-25 Thread Wallis, David
Sorry, That worked. However, is it possible to single out specific boxes and change their colour? I want the four graph headers in the top right of the trellice to be different colour to the rest. Thanks very much From: Sundar Dorai-Raj

[R] Appending strings at the beginning of a text file

2009-08-25 Thread Paul Smith
Dear All, I have a piece of text that I want to append to a text file at the beginning of the text file. I have thought about using cat() with the option 'append=T', but the appending, in this case, is done at the bottom of the text file. Any ideas? Thanks in advance, Paul

[R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Lindsay Banin
Dear R-users, I am trying to create a model using the NLS function, such that: Y = f(X) + q + e Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x

Re: [R] converting a matrix into a fn

2009-08-25 Thread David Winsemius
On Aug 25, 2009, at 8:45 AM, maram salem wrote: Dear All, I have a matrix m of the form m [,1] [,2] [1,] 9072.302 0.0004462366 [2,] 9086.811 0.0005628169 [3,] 9101.320 0.0007126347 [4,] 9115.830 0.0008986976 [5,] 9130.339 0.001126

Re: [R] Appending strings at the beginning of a text file

2009-08-25 Thread Henrique Dallazuanna
Try this; fConn - file('test.txt', 'r+') Lines - readLines(fConn) writeLines(paste(Text at beginning of file, Lines, sep = \n), con = fConn) On Tue, Aug 25, 2009 at 12:54 PM, Paul Smith phh...@gmail.com wrote: Dear All, I have a piece of text that I want to append to a text file

[R] Help with nls and error messages singular gradient

2009-08-25 Thread Michael Pearmain
Hi All, I'm trying to run nls on the data from the study by Marske (Biochemical Oxygen Demand Interpretation Using Sum of Squares Surface. M.S. thesis, University of Wisconsin, Madison, 1967) and was reported in Bates and Watts (1988). Data is as follows, (stored as mydata) time bod 11

Re: [R] lme, lmer, gls, and spatial autocorrelation

2009-08-25 Thread Timothy_Handley
Manuel, Thanks for the reference. I printed it out and read through it this morning. I think I'm going to take a gls approach. I've spent the last couple weeks reading about spatial autocorrelation, and found that the world of SAC is large, complex, and requires more time than I currently have.

[R] draw n-1 lines with n X and n Y

2009-08-25 Thread mirko86
I want to draw lines using a matrix with the X-axe on the first column, and the the Y-axe on the second column. These lines have to link the n points of a graph, so they are n-1, but the resout using these two commands: X - matrix(scan(MaxInterEdges.R,0), ncol=2);

Re: [R] scatterplot3d bug??

2009-08-25 Thread Uwe Ligges
I finally found some time to look at it: Yes, it does not work properly for angles 180 degrees. Will try to find a fix and make a new release soon. Best wishes, Uwe Ligges Vivek Ayer wrote: Hey guys, Not sure if I encountered a bug with the scatterplot3d function. Here's the calls I

Re: [R] Covariates in NLS (Multiple nonlinear regression)

2009-08-25 Thread Bert Gunter
I think you need to consult a local statistician, as you appear to be so far out of your depth statistically that even the best-intentioned help from this list may not suffice. For example, if I were that local statistician, I would ask: what is the context? -- what is the underlying scientific

Re: [R] Decision boundaries for lda function?

2009-08-25 Thread Thomas Larsen
I got hold of 'Modern Applied Statistics with S' by Venables and Ripley (p. 335-336) and I was able to answer my own question: ### AA-read.table(http://www.natursyn.dk/online/fingerprinting.txt,header=T) aa.grp - factor(c(rep('f',13),rep('b',10),rep('p',10)))

[R] how to pass user input to a function?

2009-08-25 Thread Ista Zahn
Hi everyone, I'm building a website (http://yourpsyche.org) using Jeffrey Horner's awesome Rapache module. I want to take user input, and pass it to an R script. At first I was simply using if else statements, but after a while I had so many nested if else's in my code that my head was spinning.

Re: [R] scatterplot3d bug??

2009-08-25 Thread Vivek Ayer
Great! Thanks again! Vivek 2009/8/25 Uwe Ligges lig...@statistik.tu-dortmund.de: I finally found some time to look at it: Yes, it does not work properly for angles 180 degrees. Will try to find a fix and make a new release soon. Best wishes, Uwe Ligges Vivek Ayer wrote: Hey guys,

Re: [R] how to pass user input to a function?

2009-08-25 Thread Michael E. Driscoll
Hi Ista - I've had success using the do.call function with RApache do.call(func, arglst) where 'func' is the function you desire to use, 'arglst' is a list of arguments. You may need to do some cleanup of the arguments using evalq() function (so that numbers are treated as numbers, for

  1   2   >