[R] set up a blank csv file and write time series to it row by row

2007-08-10 Thread Yuchen Luo
Dear Friends. Greetings! I have asked the question of how to set up a blank file and write a list to it as a row for many times, with the number of lists unknown. I have received many beautiful solutions. Thanks go to Professor *Murdoch, Professor *Menne, Professor Grothendieck and Dr.

[R] Unexpected behavior in PBSmapping package

2007-08-10 Thread D. Dailey
Using R 2.5.1 on Windows XP Professional, and PBSmapping package version 2.51, I have encountered some behavior which puzzles me. I am including the package's listed maintainer on this email but also seek the thoughts of the R-help community. I have a set of EventData, which I want to plot as

Re: [R] Help using gPath

2007-08-10 Thread Paul Murrell
Hi Emilio Gagliardi wrote: Hi Paul, I'm sorry for not posting code, I wasn't sure if it would be helpful without the data...should I post the code and a sample of the data? I will remember to do that next time! It's important not only to post code, but also to make sure that other

Re: [R] need help with pdf-plot

2007-08-10 Thread Antje
I still have this problem. Does anybody know any solution? Antje Antje schrieb: Hello, I'm trying to plot a set of barplots like a matrix (2 rows, 10 columns fromreduced_mat) to a pdf. It works with the following parameters: pdf(test.pdf,width=ncol(reduced_mat)*2,

Re: [R] Memory Experimentation: Rule of Thumb = 10-15 Times the Memory

2007-08-10 Thread Michael Cassin
Thanks for all the comments, The artificial dataset is as representative of my 440MB file as I could design. I did my best to reduce the complexity of my problem to minimal reproducible code as suggested in the posting guidelines. Having searched the archives, I was happy to find that the topic

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Paul Murrell
Hi Daniel Brewer wrote: Thanks for the replies, but I still cannot get what I want. I do not want the label inside the plot area, but in the top left of the paper, I suppose in the margins. When I try to use text to do this, it does not seem to plot it outside the plot area. I have also

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Jim Lemon
Daniel Brewer wrote: Thanks for the replies, but I still cannot get what I want. I do not want the label inside the plot area, but in the top left of the paper, I suppose in the margins. When I try to use text to do this, it does not seem to plot it outside the plot area. I have also tried

Re: [R] GLMM: MEEM error due to dichotomous variables

2007-08-10 Thread lorenz.gygax
I am trying to run a GLMM on some binomial data. My fixed factors include 2 dichotomous variables, day, and distance. When I run the model: modelA-glmmPQL(Leaving~Trial*Day*Dist,random=~1|Indiv,family= binomial) I get the error: iteration 1 Error in MEEM(object, conLin,

[R] GLM with tweedie: NA for AIC

2007-08-10 Thread laran gines
Dear R users; I am modelling densities of some species of birds, so I have a problem with a great ammount of zeros. I have decided to try GLMs with the tweedie family, but in all the models I have tried I got an NA for the AIC value. Just to check the problem I've compared the a glm using

[R] Cleaning up the memory

2007-08-10 Thread Monica Pisica
Hi, I have 4 huge tables on which i want to do a PCA analysis and a kmean clustering. If i run each table individually i have no problems, but if i want to run it in a for loop i exceed the memory alocation after the second table, even if i save the results as a csv table and i clean up all

[R] need help to manipulate function and time interval

2007-08-10 Thread KOITA Lassana - STAC/ACE
Hi R-users, I have to define a noise level function L and its energy in the various moment of the day by: if time is between 18:00:00 and 23:59:59 then L[j] - L[j]+5 and W - 10^((L+5)/10) if time is between 22:00:00 and 05:59:59 == L - L+10 and W - 10^((L+10)/10) else L=L and W = W

Re: [R] small sample techniques

2007-08-10 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nair, Murlidharan T Sent: Thursday, August 09, 2007 12:02 PM To: Nordlund, Dan (DSHS/RDA); r-help@stat.math.ethz.ch Subject: Re: [R] small sample techniques n=300 30% taking A relief from pain

Re: [R] write.table

2007-08-10 Thread Yinghai Deng
write.table(mydata.frame, mydata, col.names=NA, quote=F, sep=\t) will solve the problem. Deng -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Weiwei Shi Sent: August 10, 2007 12:41 PM To: r-help@stat.math.ethz.ch Subject: [R] write.table Hi, I am always

Re: [R] Subject: Re: how to include bar values in a barplot?

2007-08-10 Thread Greg Snow
Jim Lemon Wrote: I also greatly enjoyed Ted's rebuttal of the Bar charts are evil and must be banned argument. If bar charts are appropriate for the audience, give 'em bar charts. One great way to turn off your customers is to tell them what they can and can't do with your product. I

[R] Test (ignore)

2007-08-10 Thread Nordlund, Dan (DSHS/RDA)
Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] how to include bar values in a barplot?

2007-08-10 Thread Greg Snow
Welcome to the world of R. I'm glad that you found the discussion enlightening, now that you have thought about things a bit, here is some code to try out that shows some of the alternatives to the original plots you provided (which is best depends on your audience and what your main question of

[R] rfImpute

2007-08-10 Thread Eric Turkheimer
I am having trouble with the rfImpute function in the randomForest package. Here is a sample... clunk.roughfix-na.roughfix(clunk) clunk.impute-rfImpute(CONVERT~.,data=clunk) ntree OOB 1 2 300: 26.80% 3.83% 85.37% ntree OOB 1 2 300: 18.56% 5.74% 51.22% Error

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Gabor Grothendieck] table(col(mat), mat) Clever, simple, and elegant! :-) -- François Pinard http://pinard.progiciels-bpi.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Odp: having problems with factor()

2007-08-10 Thread Jabez Wilson
You've spotted it! table(df$area) 0 1 2 3 4 5 7 21 27 71 46 19 3 1 There are no values in area 6. Thank you very much. Jabez - Original Message From: Petr PIKAL [EMAIL PROTECTED] To: Jabez Wilson [EMAIL PROTECTED] Cc: R-Help r-help@stat.math.ethz.ch Sent: Friday, 10

Re: [R] Help wit matrices

2007-08-10 Thread Ravi Varadhan
An even simpler solution is: mat2 - 1 * (mat1 0.25) Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins University

Re: [R] Cleaning up the memory

2007-08-10 Thread Prof Brian Ripley
On Fri, 10 Aug 2007, Monica Pisica wrote: Thanks! I will look into ... I have 4 GB RAM, and i was monitoring the memory with Windows task manager so i was looking how R gets more and more memory allocation from less than 100Mb to 1500Mb . Then you are almost certainly fragmenting

Re: [R] Help wit matrices

2007-08-10 Thread John Kane
Will something like this help? mm - matrix(rnorm(100),nrow=10) mm nn - mm .5 nn --- Lanre Okusanya [EMAIL PROTECTED] wrote: Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value in the matrix is greater than a

Re: [R] Help wit matrices

2007-08-10 Thread Roland Rau
I hope you don't mind that I offer also two solutions. No.1 is really bad. No.2 should be on par with the other ones. Best, Roland mydata - matrix(rnorm(10*10), ncol=10) threshold.value - 1.5 mydata2 - matrix(0, nrow=nrow(mydata), ncol=ncol(mydata)) mydata3 - matrix(0, nrow=nrow(mydata),

[R] half-logit and glm (again)

2007-08-10 Thread Richard D. Morey
I know this has been dealt with before on this list, but the previous messages lacked detail, and I haven't figured it out yet. The model is: \x_{ij} = \mu + \alpha_i + \beta_j \alpha is a random effect (subjects), and \beta is a fixed effect (condition). I have a link function: p_{ij} = .5

Re: [R] write.table

2007-08-10 Thread Weiwei Shi
I did not read ?write.table in details about CSV section. Thanks. On 8/10/07, Yinghai Deng [EMAIL PROTECTED] wrote: write.table(mydata.frame, mydata, col.names=NA, quote=F, sep=\t) will solve the problem. Deng -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] kde2d error message

2007-08-10 Thread Prof Brian Ripley
If X or Y contains missing values, _you_ supplied missing values as the 'lims' argument and it will be those missing values that are reported. I do not see how you expect to be able to do density estimation with missing values: they are unknown and so no part of the answer is known. If you are

[R] write.table

2007-08-10 Thread Weiwei Shi
Hi, I am always with this qustion when I tried to write a data.frame with row.names and col.names. I have to re-make the data frame to let its first column be the rownames and let row.names=F so that I can align the colnames correctly. Is there a way or option in write.table to automatically do

Re: [R] Help using gPath

2007-08-10 Thread Emilio Gagliardi
haha Paul, It's important not only to post code, but also to make sure that other people can run it (i.e., include real data or have the code generate data or use one of R's predefined data sets). Oh, I hadn't thought of using the predefined datasets, thats a good idea! Also, isn't this

Re: [R] smoothing function for proportions

2007-08-10 Thread roger koenker
It is not entirely clear what you are using for y values in smooth.spline, but it would appear that it is just the point estimates. I would suggest using instead -- at each x value -- a few equally spaced quantiles of the estimated proportions. Implicitly, smooth.spline expects to be

Re: [R] a question on lda{MASS}

2007-08-10 Thread Weiwei Shi
hi, maybe I should re-phrase my question a bit: is there a way to get explicit formulae like Y ~ sum of CiXi from the model build by lda{MASS} to calculate $x (value) ? I assume scaling is the coeff and Xi is from test data and Y is $x called LD1. But I want to confirm this. Thanks. Weiwei

Re: [R] smoothing function for proportions

2007-08-10 Thread Rose Hoberman
Sorry, forgot to attach the graph. On 8/10/07, Rose Hoberman [EMAIL PROTECTED] wrote: I am looking for a function that can fit a smooth function to a vector of estimated proportions, such that the smoothed value is within specified confidence bounds of each proportion. In other words, given

Re: [R] Help wit matrices

2007-08-10 Thread jim holtman
Is this what you want: x - matrix(runif(100), 10) round(x, 3) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.268 0.961 0.262 0.347 0.306 0.762 0.524 0.062 0.028 0.226 [2,] 0.219 0.100 0.165 0.131 0.578 0.933 0.317 0.109 0.527 0.131 [3,] 0.517 0.763 0.322 0.374 0.910

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread Gabor Grothendieck
Try this where we have constructed the example to illustrate that it does handle the case where not all values are in each column: mat - matrix(rep(1:6, each = 4), 6) table(col(mat), mat) On 8/10/07, Tom Cohen [EMAIL PROTECTED] wrote: Dear list, I have the following dataset and want to

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Daniel Brewer
Jim Lemon wrote: Daniel Brewer wrote: Thanks for the replies, but I still cannot get what I want. I do not want the label inside the plot area, but in the top left of the paper, I suppose in the margins. When I try to use text to do this, it does not seem to plot it outside the plot area.

Re: [R] Plot legend in margin

2007-08-10 Thread Uwe Ligges
Daniel Brewer wrote: Hi all, Another plotting question I am afraid. Is there anyway of putting a legend for a plot in a margin rather than within the figure. I am trying to plot a 3x2 plot and I want to have: 1) One key along the bottom for all the plots 2) A label (a,b,c) for each plot

Re: [R] Plot legend in margin

2007-08-10 Thread Daniel Brewer
Thanks. That got me onto the right track. Because it is a multiplot and I wanted it along the bottom, I found that I had to use par(xpd=NA) and then position it relative to the last of the multiplots. After a bit of trial and error I got there. Thanks Lauri Nikkinen wrote: Very simple

[R] Plot legend in margin

2007-08-10 Thread Daniel Brewer
Hi all, Another plotting question I am afraid. Is there anyway of putting a legend for a plot in a margin rather than within the figure. I am trying to plot a 3x2 plot and I want to have: 1) One key along the bottom for all the plots 2) A label (a,b,c) for each plot (see previous emails) Is

[R] multivariate lme or lmer?

2007-08-10 Thread François Lefevre
How can we get variance/covariance components in a linear model with random effects when the response is multivariate? e.g. variance components estimates are obtained through lme or lmer in the univariate case but these functions do not seem to extend to the multivariate case. I'd like to

Re: [R] Subject: Re: how to include bar values in a barplot?

2007-08-10 Thread Jim Lemon
Gabor Grothendieck wrote: You could put the numbers inside the bars in which case it would not add to the height of the bar: x - 1:5 names(x) - letters[1:5] bp - barplot(x) text(bp, x - .02 * diff(par(usr)[3:4]), x) Indeed, the boxed.labels function makes this pretty easy.

[R] Combining two ANOVA outputs of different lengths

2007-08-10 Thread Christoph Scherber
Dear R users, I have been trying to combine two anova outputs into one single table (for later publication). The outputs are of different length, and share only some common explanatory variables. Using merge() or melt() (from the reshape package) did not work out. Here are the model outputs

Re: [R] Seasonality

2007-08-10 Thread Pfaff, Bernhard Dr.
Hello Alberto, hello Felix, aside of monthplot() and stl(), there is the possibility to use Census X-12-ARIMA. The program can be downloaded from: http://www.census.gov/srd/www/x12a/ It should be mentioned that this is *not* a pure R solution, but one can set up the relevant scripts and

[R] ordering a data.frame by average rank of multiple columns

2007-08-10 Thread Tom.O
Hi I have run into a problem and i wonder if anyone has a smart way of doing this. For example i have this data frame for 5 different test groups: Res1 - c(1,5,4,-0.5,3) Res2 - c(-1,8,2,0,3) Mean - c(0.5,1,1.5,-.5,2) MyFrame - data.frame(Res1,Res2,Mean,row.names=c(G1,G2,G3,G4,G5)) where the

Re: [R] Memory Experimentation: Rule of Thumb = 10-15 Times the Memory

2007-08-10 Thread Prof Brian Ripley
I don't understand why one would run a 64-bit version of R on a 2GB server, especially if one were worried about object size. You can run 32-bit versions of R on x86_64 Linux (see the R-admin manual for a comprehensive discussion), and most other 64-bit OSes default to 32-bit executables.

Re: [R] how to include bar values in a barplot?

2007-08-10 Thread Donatas G.
Quoting Greg Snow [EMAIL PROTECTED]: My original intent was to get the original posters out of the mode of thinking they want to match what the spreadsheet does and into thinking about what message they are trying to get across. To get them (and possibly others) thinking I made the

Re: [R] need help to manipulate function and time interval

2007-08-10 Thread Henrique Dallazuanna
Hi, Try whit: if(time[j] = 18:00:00 23:59:59) ... ... -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 10/08/07, KOITA Lassana - STAC/ACE [EMAIL PROTECTED] wrote: Hi R-users, I have to define a noise level function L and its energy in the various moment of

Re: [R] Cleaning up the memory

2007-08-10 Thread Prof Brian Ripley
On Fri, 10 Aug 2007, Monica Pisica wrote: Hi, I have 4 huge tables on which i want to do a PCA analysis and a kmean clustering. If i run each table individually i have no problems, but if i want to run it in a for loop i exceed the memory alocation after the second table, even if i save

[R] [Fwd: Re: How to apply functions over rows of multiple matrices]

2007-08-10 Thread Johannes Hüsing
[Apologies to Gabor, who I sent a personal copy of the reply erroneously instead of posting to List directly] [...] Perhaps what you really intend is to take the average over those elements in each row of the first matrix which correspond to 1's in the second in the corresponding row of the

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Daniel Brewer
Thanks for the replies, but I still cannot get what I want. I do not want the label inside the plot area, but in the top left of the paper, I suppose in the margins. When I try to use text to do this, it does not seem to plot it outside the plot area. I have also tried to use mtext, but that

[R] reading xcms files

2007-08-10 Thread Roberto Olivares Hernandez
Hi, I am using xcms library to read mass spectrum data. I generate objects from CDF files using the command line SME10 - xcmsRaw(SME_10.CDF) I have 50 CDF files with different name and I don't want to repeat the command for each one. Is there any option to read all the files and generate

Re: [R] Combining two ANOVA outputs of different lengths

2007-08-10 Thread Peter Dalgaard
Christoph Scherber wrote: Dear R users, I have been trying to combine two anova outputs into one single table (for later publication). The outputs are of different length, and share only some common explanatory variables. Using merge() or melt() (from the reshape package) did not work

[R] Re : compute ROC curve?

2007-08-10 Thread justin bem
see ROCR or accuracy package. Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 - Message d'origine De : gallon li [EMAIL PROTECTED] À : r-help r-help@stat.math.ethz.ch Envoyé le : Vendredi, 10 Août 2007, 4h15mn 36s Objet : [R] compute ROC curve? Hello, i have

Re: [R] reading xcms files

2007-08-10 Thread Prof Brian Ripley
On Fri, 10 Aug 2007, Roberto Olivares Hernandez wrote: Hi, I am using xcms library to read mass spectrum data. I generate objects from CDF files using the command line SME10 - xcmsRaw(SME_10.CDF) I have 50 CDF files with different name and I don't want to repeat the command for each

Re: [R] need help to manipulate function and time interval

2007-08-10 Thread Uwe Ligges
Henrique Dallazuanna wrote: Hi, Try whit: if(time[j] = 18:00:00 23:59:59) This code is obviously wrong and does not help for the next few lines in the questioner's message, please do not post unsensible stuff. Uwe Ligges ... ...

Re: [R] need help to manipulate function and time interval

2007-08-10 Thread Uwe Ligges
KOITA Lassana - STAC/ACE wrote: Hi R-users, I have to define a noise level function L and its energy in the various moment of the day by: if time is between 18:00:00 and 23:59:59 then L[j] - L[j]+5 and W - 10^((L+5)/10) What kind of object is time? Just a character or some

[R] smoothing function for proportions

2007-08-10 Thread Rose Hoberman
I am looking for a function that can fit a smooth function to a vector of estimated proportions, such that the smoothed value is within specified confidence bounds of each proportion. In other words, given a small number of trials and large confidence intervals, I would prefer the function to

Re: [R] Help wit matrices

2007-08-10 Thread Henrique Dallazuanna
mat2-matrix(as.numeric(mat10.25), ncol=1000) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 10/08/07, Lanre Okusanya [EMAIL PROTECTED] wrote: Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value

Re: [R] Plot legend in margin

2007-08-10 Thread Greg Snow
Another couple of things to think about: You could use the layout function to set up your multiple plots and include an extra plotting area at the bottom to place the legend in. If you stick with the solution below then the cnvrt.coords function from the TeachingDemos package may be useful (will

[R] Row name of empty string issue

2007-08-10 Thread adiamond
I have a data.frame with rownames taken from a database. Unfortunately, one of the rownames (automatically obtained from the DB) is an empty string. I often do computations on the DB s.t. the answers (rows) are indexed with respect to the rownames so a computation on a DB record might

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Tom Cohen] I have the following dataset and want to know how many times each value occur in each column. data [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -100 -100 -100000000 -100 [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [3,]

[R] kde2d error message

2007-08-10 Thread Jennifer Dillon
Hello! I am trying to do a smooth with the kde2d function, and I'm getting an error message about NAs. Does anyone have any suggestions? Does this function not do well with NAs in general? fit - kde2d(X, Y, n=100,lims=c(range(X),range(Y))) Error in if (from == to || length.out 2) by - 1 :

Re: [R] [Fwd: Re: How to apply functions over rows of multiple matrices]

2007-08-10 Thread Johannes Hüsing
1. matrices are stored columnwise so R is better at column-wise operations than row-wise. I am seeing this by my code which contains more t() than what seems healthy. However, the summaries are patient-wise over repeated measurements. Out of convention, I am storing patients in rows and

Re: [R] having problems with factor()

2007-08-10 Thread Rainer Hurling
I am afraid the above example will not work. In original dataset of Jabez Wilson numerical range is from 0..7. So try this one: df-as.factor(c(0,I,II,III,IV,V,VI,VII)[df$area+1]) Hope this is what you want, Rainer Henrique Dallazuanna schrieb: Hi, df ht area 1 3203 2 410

Re: [R] having problems with factor()

2007-08-10 Thread Henrique Dallazuanna
Hi, df ht area 1 3203 2 4104 3 2302 4 3603 5 1261 6 2802 7 2602 8 2802 9 2802 10 2602 df$area - as.factor(df$area) levels(df$area) - c(I, II, III, IV) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 10/08/07,

[R] having problems with factor()

2007-08-10 Thread Jabez Wilson
Dear R Help, I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7). htarea 1 320 3 2 410 4 3 230 2 4 360 3 5 126 1 6 280 2 7 260 2 8 280 2 9 280 2 10 260 2 ... 180 450 4 181 90 1 182

Re: [R] ordering a data.frame by average rank of multiple columns

2007-08-10 Thread Gabor Grothendieck
Try this: positions - order(ranks) On 8/10/07, Tom.O [EMAIL PROTECTED] wrote: Hi I have run into a problem and i wonder if anyone has a smart way of doing this. For example i have this data frame for 5 different test groups: Res1 - c(1,5,4,-0.5,3) Res2 - c(-1,8,2,0,3) Mean -

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Daniel Brewer
This works fine for one plot, but if it is a multiple plot (mfrow=c(2,2) say) then each individual label is placed in the same position i.e. absolute top left on the canvas. I would like it top left of each individual plot. Thanks anyway. Got any idea how to fix this? Dan Paul Murrell wrote:

Re: [R] Positioning text in top left corner of plot

2007-08-10 Thread Daniel Brewer
Thanks. That works if it is only a single plot, but if there are multiple plots (e.g. par(mfrow=c(2,2))) it confusingly puts the label in the absolute top left always i.e. the top left of plot one. Dan S Ellison wrote: Try something like mtext(side=3, line=-1, text=Here again?, adj=0,

Re: [R] need help with pdf-plot

2007-08-10 Thread Ivar Herfindal
Dear Antje I cannot see that you have got any replies yet, so I will make and attempt. However, I am sure other have more formally correct solutions. When you call the pdf(), you can set paper=a4 (or a4r for landscape). However, the width and the height of your plot should then not exceed the

[R] help with counting how many times each value occur in each column

2007-08-10 Thread Tom Cohen
Dear list, I have the following dataset and want to know how many times each value occur in each column. data [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -100 -100 -100000000 -100 [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [3,]

[R] Odp: having problems with factor()

2007-08-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.08.2007 13:41:53: Dear R Help, I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7). htarea 1 320 3 2 410 4 3 230 2 4 360 3 5 126 1 6 280 2 7 260 2 8

[R] Remove redundant observations for cross-validation

2007-08-10 Thread Eleni Rapsomaniki
Hi, This is a general statistics question that I believe occurs often so may have some R functions/packages dedicated to it. Suppose you want to check the accuracy of a classifier using a large training data-set where each row represents an observation. Is there a simple approach for removing

Re: [R] [Fwd: Re: How to apply functions over rows of multiple matrices]

2007-08-10 Thread Gabor Grothendieck
1. matrices are stored columnwise so R is better at column-wise operations than row-wise. 2. Here is one way to do it (although I am not sure its better than the index approach): row.apply - function(f, a, b) t(mapply(f, as.data.frame(t(a)), as.data.frame(t(b 3. The code for the

[R] Odp: help with counting how many times each value occur in each column

2007-08-10 Thread Petr PIKAL
Hi mat-sample(c(-50,0,-100), 100,replace=T) dim(mat)-c(10,10) mat [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]0000 -500000 0 [2,] -100 -100 -50 -5000 -100 -50 -100 -50 [3,]0 -50 -100 -1000 -50 -10000 -100

Re: [R] Cleaning up the memory

2007-08-10 Thread Monica Pisica
Thanks! I will look into ... I have 4 GB RAM, and i was monitoring the memory with Windows task manager so i was looking how R gets more and more memory allocation from less than 100Mb to 1500Mb . My initial tables are between 30 to 80 Mb and the resulting tables that incorporate

Re: [R] Help wit matrices

2007-08-10 Thread Lanre Okusanya
that was ridiculously simple. duh. THanks Lanre On 8/10/07, jim holtman [EMAIL PROTECTED] wrote: Is this what you want: x - matrix(runif(100), 10) round(x, 3) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.268 0.961 0.262 0.347 0.306 0.762 0.524 0.062 0.028

[R] Help wit matrices

2007-08-10 Thread Lanre Okusanya
Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value in the matrix is greater than a theshold value (1 or 0 indicator). i have tried mat2-as.matrix(as.numeric(mat10.25)) but that returns a 1:10 matrix. I have also tried for

Re: [R] Seasonality

2007-08-10 Thread Roland Rau
Alberto Monteiro wrote: I have a time series x = f(t), where t is taken for each month. What is the best function to detect if _x_ has a seasonal variation? If there is such seasonal effect, what is the best function to estimate it? From my own experience, I had the impression that there is

Re: [R] Help wit matrices

2007-08-10 Thread Ted Harding
On 10-Aug-07 18:05:50, Lanre Okusanya wrote: Hello all, I am working with a 1000x1000 matrix, and I would like to return a 1000x1000 matrix that tells me which value in the matrix is greater than a theshold value (1 or 0 indicator). i have tried mat2-as.matrix(as.numeric(mat10.25)) but

Re: [R] help with counting how many times each value occur in eachcolumn

2007-08-10 Thread Gasper Cankar
Tom, If all values (-100,0,-50) would be in every column then simple apply(data,2,table) would work. Even if there aren0t all values in every column you could correct that and insert additional lines with all values for all columns like data -

[R] QUESTION ON R!!!!!!!!!!!1

2007-08-10 Thread lecastil
Good day. I am employed at a public entity that handles million information and records of several variables and distributed in several topics. For the statistical analyses we use a statistical package, which allows us to call directly of the database (ORACLE) the information and to realize

Re: [R] R-excel

2007-08-10 Thread Peter Wickham
I am running R 2.5.1 using Mac OSX 10.4.10. xlsReadWrite is a Windows binary. Instead, install and load packages: (1) gtools:(2) gdata. These are both Windows and Mac binaries. gdata depends on gtools, so be sure to load gtools first or set the installation depends parameters. Then you can use