Re: [R] nls: different results if applied to normal or linearized data

2008-03-06 Thread Prof Brian Ripley
On Thu, 6 Mar 2008, Wolfgang Waser wrote: Thanks for your comments! Yes. You are fitting by least-squares on two different scales: differences in y and differences in log(y) are not comparable. Both are correct solutions to different problems. Since we have no idea what 'x' and 'y' are, we

[R] Problem with PCA

2008-03-06 Thread phuong thao
Dear Ms/Mr, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit-principle(mydata, nfactors=9, rotation=TRUE) or: result-PCA(mydata) But I don't known why R language in my computer noticed: not found

[R] kruskal wallis post hoc test in R

2008-03-06 Thread Melanie Müller
Hello, I need nemenyi-test or any other post-hoc test for kruskal-wallis, but I just can't find out how to implement this in R. My data set is nitrite concentrations in four different groups which I intend to compare. The kruskal-wallis-test showed significance, but I still don't know between

Re: [R] testing for significantly different slopes

2008-03-06 Thread Gregory Warnes
What's the problem? The problem is that I would like to do a pair-wise comparison between the multiple slopes. For example with this model: lm1 - lm (Sepal.Length ~ Species/Sepal.Width -1, data=iris) # truncated output from summary(lm1) # just the slope terms

[R] Principle component analysis function

2008-03-06 Thread phthao05
Dear All, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit-principle(mydata, nfactors=9, rotation=TRUE) or: result-PCA(mydata) But I don't known why R language in my computer noticed: not

[R] Repeated measures using lme

2008-03-06 Thread Tom Cohen
Dear list, I am trying to do a repeated analysis using lme in R and a little bit unsure if I have set up the right statement. The problem is the IL6 (interleukin 6) was measured 5 times on each individual in each of 6 companies. The hypotheses are to see whether there is a relationship

Re: [R] Asking, are simple effects different from 0

2008-03-06 Thread Chuck Cleland
On 3/5/2008 3:19 PM, jebyrnes wrote: Indeed, but are not each of the cell means also evaluations of the effect of one factor at the specific level of another factor? Is this an issue of Tomato, tomahto. I don't think it is tomato, tomahto. Say the grand mean is around 100 and the within

[R] Problem training svm with columns having same values

2008-03-06 Thread Soumyadeep nandi
What should I do if I need to train svm() with data having same value in number of columns. These must be the deterministic features for the class. Is there anyway to over come this trouble? Regards - [[alternative HTML version deleted]]

Re: [R] Excel export into R

2008-03-06 Thread Richard . Cotton
I have this in excel Control 543_BU 123_AT 432_CU I want to be able to import to R so that it will read like this c-c(543_BU,123_AT,432_CU) See the help page for read.csv ?read.csv ...and the R Data Import/Export manual http://cran.r-project.org/doc/manuals/R-data.html Two things

Re: [R] Clustering large data matrix

2008-03-06 Thread Christian Hennig
Hi there, whether clara is a proper way of clustering depends strongly on what your data are and particularly what interpretation or use you want for your clustering. You may do better with a hierarchical method after having defined a proper distance (however this would rather go into

[R] write in rimage package

2008-03-06 Thread Alberto Monteiro
Is there any way to write an imagematrix generated by the rimage package? Reproducible example: library(rimage) x - read.jpeg(system.file(data, cat.jpg, package=rimage)) png(newcat.png) plot(x) dev.off() The newcat.png image is different from the original file, because there are ugly white

Re: [R] histogram like x labels in barplot

2008-03-06 Thread Henrique Dallazuanna
If I understand: barplot(x) axis(1) On 06/03/2008, Hyunchul Kim [EMAIL PROTECTED] wrote: Hi, all I drew a barplot with barplot(data1, beside=TRUE) and then, I want to labels with hist() like x-axis ticks. How can I do this? Thanks in advance, Hyunchul

[R] CREATE INTERFACE TO SELECT DIFERENT OPTIONS

2008-03-06 Thread ermimi
Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R and I need create a Interface which allow me select diferents execution options (similar to a menu). Is posible to create this menu,or interface, with R? or I have create this interface with other

Re: [R] R_alloc with structures with flexible array members

2008-03-06 Thread Ramon Diaz-Uriarte
Hi Dirk, Wow!!! That is really useful (and I was completely unaware of it). Thanks! ('sudo apt-get install littler' continued to work perfectly in all the machines I use). Thanks, R. P.D. One more reason to sign up for your tutorial on useR 2008. On Thu, Mar 6, 2008 at 2:35 AM, Dirk

[R] switch with a single character

2008-03-06 Thread Henrik Andersson
Can anyone explain the results from switch below when a single charachter E is entered? It seems to work with letter S or N... switch(East,West=1,East=2) # Correct [1] 2 switch(E,W=1,E=2) # Not so correct [1] 1 switch(E,E=1,W=2) # Even stranger [1] E switch(S,N=1,S=-1) # Correct [1] -1

[R] kruskal wallis post hoc test in R

2008-03-06 Thread Melanie Müller
Hello, I need nemenyi-test or any other post-hoc test for kruskal-wallis, but I just can't find out how to implement this in R. My data set is nitrite concentrations in four different groups which I intend to compare. The kruskal-wallis-test showed significance, but I still don't know between

Re: [R] Clustering large data matrix

2008-03-06 Thread Andris Jankevics
Hi Dani, If you are working with NMR data, which data pretreatment methods you are using? 13112 variables for NMR data sounds too lot, you should apply some data binning or peak picking methods for data reduction. Also you must consider multicollinearity problems related to spectroscopic data,

[R] histogram like x labels in barplot

2008-03-06 Thread Hyunchul Kim
Hi, all I drew a barplot with barplot(data1, beside=TRUE) and then, I want to labels with hist() like x-axis ticks. How can I do this? Thanks in advance, Hyunchul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Principle component analysis function

2008-03-06 Thread Jim Lemon
phthao05 wrote: Dear All, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit-principle(mydata, nfactors=9, rotation=TRUE) or: result-PCA(mydata) But I don't known why R language in my

Re: [R] Excel export into R

2008-03-06 Thread Alberto Monteiro
Keizer_71 wrote: I have this in excel Control 543_BU 123_AT 432_CU I want to be able to import to R so that it will read like this c-c(543_BU,123_AT,432_CU) output: [1] 543_BU 123_AT 432_CU This is just a short version. I have about 20 rows and i need a simpler way

[R] Clustering large data matrix

2008-03-06 Thread Dani Valverde
Hello, I have a large data matrix (68x13112), each row corresponding to one observation (patients) and each column corresponding to the variables (points within an NMR spectrum). I would like to carry out some kind of clustering on these data to see how many clusters are there. I have tried

Re: [R] kruskal wallis post hoc test in R

2008-03-06 Thread Stefan Grosse
On Thursday 06 March 2008 10:18:18 am Melanie Müller wrote: MM Hello, MM I need nemenyi-test or any other post-hoc test for kruskal-wallis, but I MM just can't find out how to implement this in R. MM My data set is nitrite concentrations in four different groups which I MM intend to compare. The

[R] glm.cv delta value?

2008-03-06 Thread M�hlbacher
Hi! When I use the glm.cv function I get a value called delta which is explained as the raw cross-validation estimate of prediction error. I recently found a formula for that term in literature where it is defined as: alpha = 1 / N * sum over( yi - yi,pred,CV) Well it is somehow similar to

Re: [R] write in rimage package

2008-03-06 Thread Henrique Dallazuanna
Perhaps: png(newcat.png) par(mar=rep(0, 4)) plot(x) dev.off() On 06/03/2008, Alberto Monteiro [EMAIL PROTECTED] wrote: Is there any way to write an imagematrix generated by the rimage package? Reproducible example: library(rimage) x - read.jpeg(system.file(data, cat.jpg,

Re: [R] read.table

2008-03-06 Thread Jim Lemon
Georg Ehret wrote: Dear R community, I encounter a problem reading data into a dataframe. See attachment for the input. I use: data-read.table(test,fill=T,row.names=1) When you look at data you can see that some lines of my input were broken... I can avoid this problem by sorting the

[R] order the plots using lattice

2008-03-06 Thread audrey
Dear all, I am running something similar to this short example: library(lattice) library(geneplotter) X=matrix(cbind(1:100,100:1,c(1:50,50:1)),ncol=3) Y=matrix(cbind(1:100,1:100,1:100),ncol=3) names=1:3 dummy.df = data.frame(names = factor(names, levels = names), x = seq_along(names), y =

Re: [R] nls: different results if applied to normal or linearized data

2008-03-06 Thread Martin Elff
On Thursday 06 March 2008 (07:03:34), Prof Brian Ripley wrote: The only thing you are adding to earlier replies is incorrect: fitting by least squares does not imply a normal distribution. Thanks for the clarification, 'implies' is to strong. I should have written 'suggests' or 'is

Re: [R] Problem with PCA

2008-03-06 Thread Gavin Simpson
On Wed, 2008-03-05 at 19:43 -0800, phuong thao wrote: Dear Ms/Mr, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit-principle(mydata, nfactors=9, rotation=TRUE) or: result-PCA(mydata) But

[R] Problem training svm with columns having same values

2008-03-06 Thread Soumyadeep nandi
What should I do if I need to train svm() with data having same value across all rows in number of columns. These must be the deterministic features of the class and we cant exclude these columns to build model. The error I am getting is: Error in predict.svm(ret, xhold) : Model is empty! Is

Re: [R] R_alloc with structures with flexible array members

2008-03-06 Thread Ramon Diaz-Uriarte
Humm... but I mistakenly thought I was assuming almost nothing. R. On Wed, Mar 5, 2008 at 10:38 PM, Jeffrey Horner [EMAIL PROTECTED] wrote: Ramon Diaz-Uriarte wrote on 03/05/2008 03:00 PM: Dear Prof. Ripley, Yes, of course! You are right. What a silly mistake on my part! I was

Re: [R] Principle component analysis

2008-03-06 Thread Liviu Andronic
On 3/5/08, phthao05 [EMAIL PROTECTED] wrote: 1) I don't know why PCA rotation function not run although I try many times. Would you please hepl me and explain how to read the PCA map (both of rotated and unrotated) in a concrete example. If you used the example from here [1], there's a typo

[R] Interface or Select menu

2008-03-06 Thread er MIMI MATOS
Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R and I need create a Interface which allow me select diferents execution options (similar to a menu). Is posible to create this menu,or interface, with R? or I have create this interface with

[R] replace NA with 9999 in zoo object

2008-03-06 Thread stephen sefick
This is the same set of data that I have been working with for those in the know. it is a matrix of ~174 columns and ~70,000 rows. I have it as a zoo object, but I could read it in as just a matrix as long as the date time stamp won't be corrupted. here is an example of what a column would look

[R] Try to save as PDF: font family not found in PostScript font database

2008-03-06 Thread michael watson (IAH-C)
Hi I'm using 2.6.0 on Windows XP SP2. I realise I'm on an old version, please tell me if the problem is fixed in the newer versions. When I try and use the graphics window menu to save a graph as PDF, I get the following error, and no PDF produced Error: Invalid font type In addition: Warning

Re: [R] CREATE INTERFACE TO SELECT DIFERENT OPTIONS

2008-03-06 Thread Henrique Dallazuanna
Try this: switch(menu(c(Normal, Uniform)), A=rnorm(5), B=runif(5)) for more details see ?menu On 06/03/2008, ermimi [EMAIL PROTECTED] wrote: Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R and I need create a Interface which allow me

Re: [R] Principle component analysis function

2008-03-06 Thread Paul Hiemstra
phthao05 wrote: Dear All, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit-principle(mydata, nfactors=9, rotation=TRUE) or: result-PCA(mydata) But I don't known why R language in my

Re: [R] Interface or Select menu

2008-03-06 Thread Alberto Monteiro
er MIMI piki PIKINHA wrote: Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R and I need create a Interface which allow me select diferents execution options (similar to a menu) . Is posible to create this menu,or interface, with R? or I

[R] Odp: replace NA with 9999 in zoo object

2008-03-06 Thread Petr PIKAL
Hi not sure about zoo but data frame or matrix can be indexed mat[is.na(mat)] - Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 06.03.2008 14:09:16: This is the same set of data that I have been working with for those in the know. it is a matrix of ~174 columns and ~70,000

Re: [R] loop

2008-03-06 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 05.03.2008 18:04:35: Thank you Yinghai, that's what I need :-)! Yinghai Deng [EMAIL PROTECTED] schrieb: m - seq(-1,1,0.1) x1 - c() x2 - c() for(i in 1:length(m)){ x1[i] - m[i] x2[i] - m[i]^2 } dat - data.frame(x1,x2) The same result you

Re: [R] replace NA with 9999 in zoo object

2008-03-06 Thread Gabor Grothendieck
It works just the same as matrices: z - zoo(cbind(a = c(1, NA, 3), b = c(NA, 10, 11))) z[is.na(z)] - 999 z a b 1 1 999 2 999 10 3 3 11 There are also a number of other methods for handling NAs in zoo: na.approx na.contiguous na.locf na.spline na.trim and na.stinterp in the

[R] 1-pnorm values in a table

2008-03-06 Thread Jabez Wilson
Hi, I've read in a csv file (test.csv) which gives me the following table: Hin1 Hin2 Hin3Hin4 Hin5 Hin6 HAI1 9534.83 4001.74 157.16 3736.93 484.60 59.25 HAI2 13272.48 1519.88 36.35 33.64 46.68 82.11 HAI3 12587.71 5686.94 656.62 572.29 351.60 136.91

Re: [R] 1-pnorm values in a table

2008-03-06 Thread Richard . Cotton
I've read in a csv file (test.csv) which gives me the following table: Hin1 Hin2 Hin3Hin4 Hin5 Hin6 HAI1 9534.83 4001.74 157.16 3736.93 484.60 59.25 HAI2 13272.48 1519.88 36.35 33.64 46.68 82.11 HAI3 12587.71 5686.94 656.62 572.29 351.60 136.91 HAI4

Re: [R] switch with a single character

2008-03-06 Thread Charles C. Berry
On Thu, 6 Mar 2008, Henrik Andersson wrote: Can anyone explain the results from switch below when a single charachter E is entered? It seems to work with letter S or N... ?switch . . . Warning: Beware of partial matching: an alternative 'E = foo' will match the first argument

Re: [R] 1-pnorm values in a table

2008-03-06 Thread John Kane
This is a bit ugly but I think it works. myf - function(x) 1-pnorm(x,mean(x), sd(x)) results - apply(test, 2, myf) mymeans - apply(test, 2, mean); mymeans for (i in 1:length(test)){ test[,i][test[,1]=mymeans[i]] - NA } results[is.na(test)]

Re: [R] 1-pnorm values in a table

2008-03-06 Thread Ben Bolker
Richard.Cotton at hsl.gov.uk writes: [snip] Try: nrows - 5 mm - matrix(rnorm(30),nrow=nrows) sd.by.col - apply(mm,2,sd) mean.by.col - apply(mm,2,mean) values - 1-mapply(pnorm, q=as.vector(mm), mean=rep(mean.by.col, nrows)), sd=rep(sd.by.col, nrows))) values - matrix(values, nrow=5)

Re: [R] Softmax in nnet

2008-03-06 Thread G Ilhamto
(this is a resend) Hi R help, I run my data in nnet with skip layer, factor response (with 0 1 values) and explicitly put softmax=T to compare the result of the default nnet with no softmax specification. I assume this should give me the same result. I got the result from the default one,

Re: [R] Asking, are simple effects different from 0

2008-03-06 Thread jebyrnes
Ah, I see where we are talking past each other. In my particular analysis (I'm looking at deviations from a predicted value), any deviation from 0 (whether due to grand mean or not) is actually very very interesting. What is ultimately interesting to me is the sign of that difference, but, I

Re: [R] ipf function in R

2008-03-06 Thread GREGOR Brian J
Chandra, While I can't advise on how to use the ipf function in the cat package, I can offer the following function that we use here to balance rebalance arrays with new marginal totals. #ipf.R #Function to iteratively proportionally fit a multidimensional array #IPF also known as Fratar method,

Re: [R] 1-pnorm values in a table

2008-03-06 Thread Jabez Wilson
Richard.Cotton at hsl.gov.uk writes: [snip] Try: nrows - 5 mm - matrix(rnorm(30),nrow=nrows) sd.by.col - apply(mm,2,sd) mean.by.col - apply(mm,2,mean) values - 1-mapply(pnorm, q=as.vector(mm), mean=rep(mean.by.col, nrows)), sd=rep(sd.by.col, nrows))) values -

Re: [R] Variable importance in Random Forests

2008-03-06 Thread Liaw, Andy
Depending on the way you ran randomForest, the variable of interest may have been used in many splits in many trees. The information can be extracted using the getTree() function. However, I suspect it might be more useful to look at partialPlot(). Best, Andy -Original Message-

Re: [R] legend for several graphics

2008-03-06 Thread Greg Snow
I think you need a par(xpd=NA) before the legend command (At least it did not show up for me until I set xpd). For positioning the overall title and legend, one option is the cnvrt.coords function in the TeachingDemos package. To center the overall title over the central column plots (the

Re: [R] mean and sd with number of values?

2008-03-06 Thread Jorge Iván Vélez
Hi Martin, Try x=c(NA,NA,rnorm(50),NA) sum(!is.na(x)) HTH Jorge On Thu, Mar 6, 2008 at 11:41 AM, Martin Kaffanke [EMAIL PROTECTED] wrote: Hi there, When i do mean(fl[1:20], na.rm=T) sd(fl[1:20], na.rm=T) I get 20 Results, but now I'd like to know from how many numbers my mean and

[R] Odp: mean and sd with number of values?

2008-03-06 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 06.03.2008 17:41:06: Hi there, When i do mean(fl[1:20], na.rm=T) e.g. sum(!is.na(fl[1:20])) Regards Petr sd(fl[1:20], na.rm=T) I get 20 Results, but now I'd like to know from how many numbers my mean and sd are calculated. How to I use the

Re: [R] legend for several graphics

2008-03-06 Thread Gavin Simpson
On Thu, 2008-03-06 at 09:41 -0700, Greg Snow wrote: I think you need a par(xpd=NA) before the legend command (At least it did not show up for me until I set xpd). Hi Greg, Yes, you are correct. Apologies to the OP, Georg. I must have set xpd = NA during my tests and not reset it, so when I ran

Re: [R] mean and sd with number of values?

2008-03-06 Thread Erik Iverson
Martin - Does the following help? sapply(fl, function(x) sum(!is.na(x))) See ?sapply Best, Erik Iverson Martin Kaffanke wrote: Hi there, When i do mean(fl[1:20], na.rm=T) sd(fl[1:20], na.rm=T) I get 20 Results, but now I'd like to know from how many numbers my mean and sd are

[R] Tcl/Tk not working on Mac OS X

2008-03-06 Thread Aaron Solomon Adelman
Greetings. Yesterday I decided to try out Rcmdr, but it refused to load. I traced the problem to the library tcltk, which when I tried to load it told me this: library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories:

Re: [R] Odp: mean and sd with number of values?

2008-03-06 Thread Martin Kaffanke
Am Donnerstag, den 06.03.2008, 17:47 +0100 schrieb Petr PIKAL: Hi [EMAIL PROTECTED] napsal dne 06.03.2008 17:41:06: Hi there, When i do mean(fl[1:20], na.rm=T) e.g. sum(!is.na(fl[1:20])) This seems to give me a sum of all the items. But I'd like to have it per column.

Re: [R] Tcl/Tk not working on Mac OS X

2008-03-06 Thread Roy Mendelssohn
Hi Aaron: Look at: http://article.gmane.org/gmane.comp.lang.r.mac/2305 Do take time to read the R Posting FAQ. A query to the mail-list archive would have shown that this problem has been discussed repeatedly. HTH, -Roy M. On Mar 6, 2008, at 9:34 AM, Aaron Solomon Adelman wrote:

[R] calculate AUC and plot ROC in R

2008-03-06 Thread He, Yulei
Hi, there: Could someone tell me a simple function of plot ROC curve and calculate AUC in R? My setting is very simple, a column of the true binary response and another column of predicted probabilities. Thanks! Yulei [[alternative HTML version deleted]]

Re: [R] calculate AUC and plot ROC in R

2008-03-06 Thread Frank E Harrell Jr
He, Yulei wrote: Hi, there: Could someone tell me a simple function of plot ROC curve and calculate AUC in R? My setting is very simple, a column of the true binary response and another column of predicted probabilities. Thanks! Yulei ROC area is easy. See these

Re: [R] calculate AUC and plot ROC in R

2008-03-06 Thread Dieter Menne
He, Yulei he at hcp.med.harvard.edu writes: Could someone tell me a simple function of plot ROC curve and calculate AUC in R? My setting is very simple, a column of the true binary response and another column of predicted probabilities. There are a few packages with examples around, which you

[R] build options for R

2008-03-06 Thread Scott Zentz
Hello Everyone, Recently I was given a Java servlet based web calculator that will call R (libR.so to be exact) but I am having trouble trying to disable R from requiring --save, --no-save or --vanilla... Is there any way to build R on linux and disable R from asking --save, --no-save or

[R] Array arithmetic

2008-03-06 Thread Gang Chen
I have two arrays A and B with dimensions of (L, M, N, P) and (L, M, N), and I want to do for (i in 1:L) { for (j in 1:M) { for (k in 1:N) { if (abs(B[i, j, k]) 10e-5) C[i, j, k,] - A[i, j, k,]/B[i, j, k] else C[i, j, k,] - 0 } } } How can I get C more efficiently than looping? Thanks,

[R] R-Logo in \LaTeX

2008-03-06 Thread Mag. Ferri Leberl
Dear everybody! Is there a command in \LaTeX to display the R-Logo or has anybody made it up? Thank you in advance. Yours, sincerely Mag. Ferri Leberl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Array arithmetic

2008-03-06 Thread Benilton Carvalho
apparently you forgot the commented, minimal, self-contained, reproducible code part... L = 10 M = 20 N = 30 P = 40 set.seed(1) A = array(rnorm(L*M*N*P), dim=c(L, M, N, P)) B = array(rnorm(L*M*N), dim=c(L, M, N)) B[sample(100, 10)] = 0 C = array(0, dim=c(L, M, N, P)) for (i in 1:L) { for (j in

Re: [R] Array arithmetic

2008-03-06 Thread Henrique Dallazuanna
I think this should work: array(A[abs(B) 10e-5]/B[abs(B) 10e-5], dim=c(L, M, N, P)) On 06/03/2008, Gang Chen [EMAIL PROTECTED] wrote: I have two arrays A and B with dimensions of (L, M, N, P) and (L, M, N), and I want to do for (i in 1:L) { for (j in 1:M) { for (k in 1:N) { if

Re: [R] Array arithmetic

2008-03-06 Thread Henrique Dallazuanna
Hum you are rigth, I forgot of 'else'. On 06/03/2008, Benilton Carvalho [EMAIL PROTECTED] wrote: no, it won't. you're doing the right math on the valid subset... but you're not returning the zeros where needed therefore, the whole thing will get recycled to match the dimensions. b

[R] Help with parsing a data file

2008-03-06 Thread sean
Hi All, I need to parse data from a file, example shown below. The first two lines can be skipped, the third line contains the column names. The next 13 lines can be skipped. The next line 1991 is a year value, with the following 13 values data for that year. The file then repeats this format

Re: [R] Correlation matrix one side with significance

2008-03-06 Thread Martin Kaffanke
Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna: Try this: On 05/03/2008, Martin Kaffanke [EMAIL PROTECTED] wrote: Hi there! In my case, cor(d[1:20]) makes me a good correlation matrix. Now I'd like to have it one sided, means only the left bottom

Re: [R] Correlation matrix one side with significance

2008-03-06 Thread Henrique Dallazuanna
Please provide a example of what you want On 06/03/2008, Martin Kaffanke [EMAIL PROTECTED] wrote: Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna: Try this: On 05/03/2008, Martin Kaffanke [EMAIL PROTECTED] wrote: Hi there! In my case,

Re: [R] Array arithmetic

2008-03-06 Thread Benilton Carvalho
no, it won't. you're doing the right math on the valid subset... but you're not returning the zeros where needed therefore, the whole thing will get recycled to match the dimensions. b On Mar 6, 2008, at 2:03 PM, Henrique Dallazuanna wrote: I think this should work: array(A[abs(B)

[R] Storing output in an array or matrix

2008-03-06 Thread tieflingrogue
I have a data set which has, let's say, income by state. I'm trying to output income quartiles for each state into an array by doing a loop so that I don't have to do it state by state by hand. ie, something like for (i in 1:50) { quantile(subset(data,state==i)$income) - r[i,5] } where

Re: [R] Correlation matrix one side with significance

2008-03-06 Thread Chuck Cleland
On 3/6/2008 2:07 PM, Martin Kaffanke wrote: Am Mittwoch, den 05.03.2008, 14:38 -0300 schrieb Henrique Dallazuanna: Try this: On 05/03/2008, Martin Kaffanke [EMAIL PROTECTED] wrote: Hi there! In my case, cor(d[1:20]) makes me a good correlation matrix. Now I'd like to have it one

[R] Help with colinearity problem in multiple linear regression

2008-03-06 Thread Caleb Welton
Hello, For basic linear regression lm() does the job well, for datasets that are larger than memory biglm() seems to work. I'm working on a parallel implementation of multiple linear regression for datasets that are too large for memory. Currently I am working over least squares:

Re: [R] Storing output in an array or matrix

2008-03-06 Thread Erik Iverson
I think you could get this done with the function tapply, but it's not clear because you don't give an example of your data. If tapply is not the answer, certainly there is a way that is better than resorting to doing it 'by hand' (brute force). See ?tapply Best, Erik Iverson tieflingrogue

Re: [R] Help with parsing a data file

2008-03-06 Thread Peter Alspach
Sean I'm sure there are many ways of doing this. I assume you have read the data in R as a data.frame with 24 columns and 2+1+13+(1+13)*n rows, where n is the number of years, and that you want a data.frame with 25 columns (one extra for year) and 13*n rows (although I am not sure why 13 MOnths)

Re: [R] order the plots using lattice

2008-03-06 Thread Patrick Connolly
On Thu, 06-Mar-2008 at 12:00PM +, audrey wrote: [...] | In the output, the first plot is represented in the bottom left | corner, I would like the plots to be drawn from the top left corner | but I cannot find in the Lattice help, the argument to set to do IIRC, it's as.table = TRUE Look

Re: [R] Help with parsing a data file

2008-03-06 Thread Henrique Dallazuanna
Try this: lines - readLines('yourfile') newLines - lines[-(1:(13+3))] coln - scan(textConnection(lines[3]), what=) lapply(which(nchar(newLines) == 4), function(x)read.table(textConnection(newLines[seq(x + 1, x + 13)]), col.names=coln)) On 06/03/2008, sean [EMAIL PROTECTED] wrote: Hi All, I

[R] Interesting remarks about R back in 1999

2008-03-06 Thread francogrex
Hi, this is not an R-help post, but I found this extract below that was written by a leading mathematician back in 1999 when he was talking about statistics and computing. I found it interesting to share and I ask your opinion do you think this still holds today or things have changed? Thanks.

Re: [R] x-only zoom and pan?

2008-03-06 Thread Martin
Peter Wolf s-plus at wiwi.uni-bielefeld.de writes: Hallo here is a simple proposal using tcltk-sliders. Peter Wolf # step 3: test it. ts.zoom(runif(1), rexp(1), rnorm(1)) Randy Zelick wrote: Hello list, Could the following be done without too much grief...?

Re: [R] CREATE INTERFACE TO SELECT DIFERENT OPTIONS

2008-03-06 Thread bartjoosen
ermimi wrote: Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R and I need create a Interface which allow me select diferents execution options (similar to a menu). Is posible to create this menu,or interface, with R? or I have create this

[R] Changing code within a package

2008-03-06 Thread Shewcraft, Ryan
I was able to hack the code in the polspline package in order to change the plot.polymars function so that I can set the limits of my y-axis. However, I was only able to do this by entering plot.polymars in R, copying the code to Word, changing what I needed, and then pasting the new code in R to

Re: [R] Array arithmetic

2008-03-06 Thread Gang Chen
Thank both of you for the suggestions! Gang On Mar 6, 2008, at 2:12 PM, Henrique Dallazuanna wrote: Hum you are rigth, I forgot of 'else'. On 06/03/2008, Benilton Carvalho [EMAIL PROTECTED] wrote: no, it won't. you're doing the right math on the valid subset... but you're not

Re: [R] Changing code within a package

2008-03-06 Thread Duncan Murdoch
On 3/6/2008 3:57 PM, Shewcraft, Ryan wrote: I was able to hack the code in the polspline package in order to change the plot.polymars function so that I can set the limits of my y-axis. However, I was only able to do this by entering plot.polymars in R, copying the code to Word, changing what

[R] can't merge zoo ojects and convert to ts (been trying for 2 days)

2008-03-06 Thread Darren Norris
I'm stuck, but am sure it can be done I just don't understand how. I have data in an irregular timeseries. I want to be able to use stl to visualise the data (see seasonal parts etc), so I need to change to regular series of class ts (I think). I am using 2 zoo objects one is regular and the

[R] R code for selecting places spatially and by time

2008-03-06 Thread Andrew McFadden
Hi all The code of trying to write relates to selecting properties (given by x and y co-ordinates) spatially (distance X from infected properties identified by date) over a certain time period. i.e. what properties are within 3 km from properties infected on 2008-01-01 over the last 14 days.

[R] How to hold a value(Mean sq) with a string

2008-03-06 Thread Felipe Carrillo
Hi all: Can someone advice me on how to hold the residuals Mean sq value on a string so it can be used in other calculations. I was trying something like this: Msquare-dfr$Mean sq but fails..Thanks dfr - read.table(textConnection(percentQ Efficiency 1.5650.0125 1.94 0.0213

Re: [R] How to hold a value(Mean sq) with a string

2008-03-06 Thread Erik Iverson
Assign your anova object a name, like fm1 - anova(lm(Efficiency~percentQ,data=dfr)) Then do names(fm1) and try fm1$Mean Sq Notice you were trying to find Mean Sq in dfr, your original data.frame. -Erik Iverson Felipe Carrillo wrote: Hi all: Can someone advice me on how to hold the

Re: [R] How to hold a value(Mean sq) with a string

2008-03-06 Thread Jorge Iván Vélez
Hi Felipe, Try this dfr - read.table( textConnection(percentQ Efficiency 1.5650.0125 1.94 0.0213 0.8760.003736 1.0270.006 1.5360.0148 1.5360.0162 2.6070.02 1.4560.0157 2.16 0.0103 1.6980.0196 1.64 0.0098684 1.8140.0183 2.3940.0107 2.469

[R] Sweave and the prompt

2008-03-06 Thread Christophe Genolini
Hi the list I would also like to remove the prompt, in order to let the reader cut-and-paste from pdf to R. So I set the prompt to with options(prompt= ,continue= ) But it add an extrat space at the start of each line. I also try some code options(prompt=\a,continue=\a) After a big figth in

Re: [R] colored 3d scatter plot

2008-03-06 Thread SNN
Thank you all for your help. SNN wrote: Hi All, I have data for two groups, group with 100 points and group B with 15 points. i needed plot these two groups in one scatter plot, each group with a different color. I tried plot3d(data, col = c(red, blue)[c(rep(1, 100), rep(2,

[R] Installing package from source in windows

2008-03-06 Thread Shewcraft, Ryan
Hi all, I am trying to install a custom package from its source using windows. Using this guide http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html I've gotten to the fifth step, but I get the following error in the command window: 'sh' is not recognized as an internal or

Re: [R] R-Logo in \LaTeX

2008-03-06 Thread Charilaos Skiadas
On Mar 6, 2008, at 1:49 PM, Mag. Ferri Leberl wrote: Dear everybody! Is there a command in \LaTeX to display the R-Logo or has anybody made it up? Thank you in advance. Isn't it just an image? Hence you would include it like one usually includes images. Or do you mean something else?

[R] dictionary lookup

2008-03-06 Thread Thomas Manke
Hi, I have a character-valued vector (old_names) and want to translate its entries whenever possible, using a dictionary (dict=data.frame). The translation direction is dict$V3 -- dict$V2, but some values may be undefined (NA). I suppose this is a very basic task, but I tried in vain to make it

Re: [R] Sweave and extra line

2008-03-06 Thread Duncan Murdoch
On 06/03/2008 5:59 PM, Christophe Genolini wrote: Hi the list, I am using Sweave. Between the Sinput and the Soutput, there is always an extra line: 2+2 [1] 4 Is it possible to remove it ? Here's some code I worked out a while ago: % This removes the extra spacing after code and

Re: [R] Sweave and the prompt

2008-03-06 Thread Duncan Murdoch
On 06/03/2008 6:01 PM, Christophe Genolini wrote: Hi the list I would also like to remove the prompt, in order to let the reader cut-and-paste from pdf to R. So I set the prompt to with options(prompt= ,continue= ) But it add an extrat space at the start of each line. I also try some

Re: [R] Installing package from source in windows

2008-03-06 Thread Duncan Murdoch
On 06/03/2008 6:46 PM, Shewcraft, Ryan wrote: Hi all, I am trying to install a custom package from its source using windows. Using this guide http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html I've gotten to the fifth step, but I get the following error in the command

Re: [R] dictionary lookup

2008-03-06 Thread Duncan Murdoch
On 06/03/2008 6:45 PM, Thomas Manke wrote: Hi, I have a character-valued vector (old_names) and want to translate its entries whenever possible, using a dictionary (dict=data.frame). The translation direction is dict$V3 -- dict$V2, but some values may be undefined (NA). I suppose this is a

Re: [R] Interesting remarks about R back in 1999

2008-03-06 Thread Spencer Graves
Many people love Mathematica, but it's strength is symbolic mathematics, not data analysis. Googling for data analysis in Mathematica and R led me to an advertisement for a Mathematica add-on called RLink, which is an exciting new tool [to] leverage the statistical analysis power of R

[R] read stata data file

2008-03-06 Thread John Taffe
Dear R-help list, I'm new to R. I tried to get R to read a Stata data file using the read.dta function in the package foreign, which I downloaded and extracted to C:\Program Files\R\R-2.6.2\library on my pc. I tried nora - read.dta(nora.dta) and got Error: could not find function

  1   2   >