[R] Profiler for R ?

2010-07-05 Thread Ralf B
Hi, is there such a thing as a profiler for R that informs about a) how much processing time is used by particular functions and commands and b) how much memory is used for creating how many objects (or types of data structures)? In a way I am looking for something similar to the java profiler

[R] Fast String operations in R ? Cost of String operations

2010-07-05 Thread Ralf B
Hi experts, currently developing some code that checks a large amount of Strings for the existence of sub-strings and pattern (detecting sub-strings within URLs). I wonder if there is information about how well particular String operations work in R together with comparisons. Are there

Re: [R] UK map in R

2010-07-05 Thread Barry Rowlingson
On Sun, Jul 4, 2010 at 9:10 PM, happy naren narender.ku...@gmail.com wrote: Hi, i am currently working on a problem where i need to plot latitude and longitude data on a respective county of UK. After this i want to plot altitude data to make a 3d surface on which then i have to plot my

Re: [R] LatticeExtra Parallel

2010-07-05 Thread Tal Galili
Hi Ben, You can also experiment with matlines Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Profiler for R ?

2010-07-05 Thread Joshua Wiley
Perhaps ?Rprof HTH, Josh On Sun, Jul 4, 2010 at 11:26 PM, Ralf B ralf.bie...@gmail.com wrote: Hi, is there such a thing as a profiler for R that informs about a) how much processing time is used by particular functions and commands and b) how much memory is used for creating how many

[R] timeseries

2010-07-05 Thread nuncio m
Dear useRs, I am trying to construct a time series using as.ts function, surprisingly when I plot the data the x axis do not show the time in years, however if I use ts(data), time in years are shown in the x axis. Why such difference in the results of both the commands Thanks nuncio --

[R] repeated measures with missing data

2010-07-05 Thread Rafael Diaz
Dear R help group, I am teaching myself linear mixed models with missing data since I would like to analyze a stats design with these kind of models. The textbook example is for the procedure proc MIXED in SAS, but I would like to know if there is an equivalent in R. This example only

[R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread RaoulD
Hi, Can anyone please help me with how I could add labels with the value for each bar in a barchart? (similar to how data labels can be added in Excel) I have done a lot of searching but havent been lucky. Thanks, Raoul -- View this message in context:

Re: [R] repeated measures with missing data

2010-07-05 Thread ONKELINX, Thierry
Dear Rafael, The line below had one closing bracket to much. The line below should work. am2 - lmer(dv ~ myfactor + (1|subject), data = mydata) Furthermore I would advise to change myfactor for a character variable to a factor. HTH, Thierry

Re: [R] question concerning VGAM

2010-07-05 Thread Martin Maechler
== Martin Spindler martin.spind...@gmx.de on Mon, 5 Jul 2010 07:48:42 +0200 writes: Hello everyone, using the VGAM package and the following code library(VGAM) bp1 - vglm(cbind(daten$anzahl_b, daten$deckung_b) ~ ., binom2.rho, data=daten1) summary(bp1)

[R] Command run

2010-07-05 Thread Mahdieh TAHER (NUHS)
Hi Sir/Madam, I am calling R from an ASP.NET project. The outputs are a chart and cor(P1,P2). The exe file is in c:\program files\R\R-2.11.1\bin\rscript.exe, when I the asp.net project opens cmd.exe, and run r - -vanilla r_sample.r , it says r is not recognized as defined command. (r_sample.r

[R] lc2 Model

2010-07-05 Thread Kathrin Schreglmann
Dear developping team, I am a graduate student trying to fit a dose response curve for my thesis. I found one publication talking about the lc2-Modell in the drc Function (drm package), but I didn't find any related info how to create my data. fct = lc.2() was not found by my R. How do I get

[R] R squared from cv.lm

2010-07-05 Thread Andruit
Hello, I used the cv.lm function to validate a linear regression model fit-lm(y ~ x1+x2+x3+x4+0, data=mydata) without intercept I tried to validate the model by performing a leave one out cross validation procedure usinfg the cvlm function: CVlm(df=mydata, fit, m=196) But how

[R] Stoch Prog in R

2010-07-05 Thread Sudhakar Achath
Can you please let know if there are any packages for stochastic linear programming (SLP) in R? Thanks in advance Sudhakar Achath __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] r code exchange site?

2010-07-05 Thread pdb
Does there exist a site where snippets of r code examples can be deposited, such as the one that exists for matlab? http://www.mathworks.com/matlabcentral/fileexchange/ ps I also noted from the main r site http://www.r-project.org/ when you click on the nabble link under the search link, I

Re: [R] r code exchange site?

2010-07-05 Thread Liviu Andronic
Hello There is http://www.r-cookbook.com/, but I'm not sure that it is what you're looking for. Liviu On Mon, Jul 5, 2010 at 10:54 AM, pdb ph...@philbrierley.com wrote: Does there exist a site where snippets of r code examples can be deposited, such as the one that exists for matlab?

Re: [R] repeated measures with missing data

2010-07-05 Thread Gabor Grothendieck
On Mon, Jul 5, 2010 at 4:00 AM, ONKELINX, Thierry thierry.onkel...@inbo.be wrote: Dear Rafael, The line below had one closing bracket to much. The line below should work. am2 - lmer(dv ~ myfactor + (1|subject), data = mydata) Furthermore I would advise to change myfactor for a character

Re: [R] lattice xyplot with bty=l

2010-07-05 Thread László Sándor
Hi all, Back in 2007, Deepayan and Patrick had an exchange about how to modify axes for lattice plots (pasted below). I need something similar, but I also need to produce ticks on the axes. Deepayan quickly coded up substitute gridlines because they needed to make the default box transparent. The

[R] Execute commands in 'R' within PERL Program

2010-07-05 Thread chakri_amateur
Hi, I wrote a program in PERL which creates a file with .net extension (.. xyz.net). I want to call R from within my PERL program, execute 3-line command in 'R', store the output and get back to PERL program. RSPerl is of omegahat is a good software which creates interface between R and PERL,

[R] adding a row of names to data.frame

2010-07-05 Thread Maas James Dr (MED)
Relative noob here, I have a data.frame and simply want to add an explicit column of names in column 1 of the form trial_number01 for row 1, trial_number02 for row 2 etc. It is simply for visual purposes and to explain data to others. I've tried Using row.names and other but still no

[R] Creating DataFrame of Vectors Data Structure for Classification

2010-07-05 Thread Gundala Viswanath
Dear Experts, I have a input file that looks like this -0.438185,svm,1 -0.766791,svm,1 0.695282,svm,-1 0.759100,svm,-1 0.034400,svm,1 0.524807,svm,1 -0.27647800,nn,1 -0.16120810,nn,-1 0.63911350,nn,1 0.400554110,nn,1 0.429192240,nn,-1 0.454239140,nn,1 How can I create a data structure in R so

Re: [R] Assigning entries to categories

2010-07-05 Thread LogLord
OK, thanks for the help! Here a more complex example: a=c(x,y,z) b=c(8,14,19) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c(cat1,cat2,cat3,cat4,cat5,cat6) b1=c(14,5,8,20,19,1) c_start=c(50,50,20,20,18000,60) c_stop=c(55,55,201000,201000,2,70)

Re: [R] adding a row of names to data.frame

2010-07-05 Thread Pete B
Jim Is this what you need? #create data Lines - Drug1 Drug2 Drug3 Drug4 153 133 145 111 189 177 200 170 221 241 187 243 215 228 201 178 302 283 292 248 223 255 220 202 201 238 233 163 173 164 172 139 121 128 119 120 100 200 300 400 # read in

[R] Linux-Windows problem

2010-07-05 Thread Ildiko Varga
Dear All, I faced the following problem. With the same data.frame the results are different under Linux and Windows. Could you help on this topic? Thanks in advance, Ildiko Linux: d = read.csv(CRP.csv) d$drugCode = as.numeric(d$drug) cor(d, use=pairwise.complete.obs) PATIENT

Re: [R] Linux-Windows problem

2010-07-05 Thread Uwe Ligges
On 05.07.2010 14:31, Ildiko Varga wrote: Dear All, I faced the following problem. With the same data.frame the results are different under Linux and Windows. Could you help on this topic? I guess you read in the data differently since you have different default encodings on both platforms

[R] Counting defined character within String

2010-07-05 Thread Kunzler, Andreas
Dear list, I'm looking for a way to count the number of | within an object. The character | is used to separated ids. Assume a data (d) structure like Var NA NA NA NA NA 1 1|2 1|22|45 3 4b|24789 I need to know the maximum number of ids within one object. In this case 3 (1|22|45) Does

Re: [R] Counting defined character within String

2010-07-05 Thread Henrique Dallazuanna
Try this: sapply(strsplit(as.character(Var$Var), \\|), length) On Mon, Jul 5, 2010 at 11:04 AM, Kunzler, Andreas a.kunz...@bzaek.dewrote: Dear list, I'm looking for a way to count the number of | within an object. The character | is used to separated ids. Assume a data (d) structure like

[R] XTFEVD implementation in R

2010-07-05 Thread Suresh Singh
Is there a package in R for XTFEVD procedure (Plümper Troeger)? Also, are there any examples of Hausman-Taylor implementation in R? I understand that it can be done using plm package but could not find examples with actual data Thank you, Suresh Singh Fisher College of Business The Ohio State

Re: [R] Counting defined character within String

2010-07-05 Thread Marc Schwartz
On Jul 5, 2010, at 9:04 AM, Kunzler, Andreas wrote: Dear list, I'm looking for a way to count the number of | within an object. The character | is used to separated ids. Assume a data (d) structure like Var NA NA NA NA NA 1 1|2 1|22|45 3 4b|24789 I need to know the maximum

Re: [R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread David Winsemius
On Jul 4, 2010, at 11:43 PM, RaoulD wrote: Hi, Can anyone please help me with how I could add labels with the value for each bar in a barchart? (similar to how data labels can be added in Excel) I have done a lot of searching but havent been lucky. This is generally pretty easy with

Re: [R] r code exchange site?

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 5:54 AM, pdb wrote: Does there exist a site where snippets of r code examples can be deposited, such as the one that exists for matlab? From the main R-project page wht Wiki link takes you here: http://rwiki.sciviews.org/doku.php There is also an R section on stack

Re: [R] r code exchange site?

2010-07-05 Thread Albert-Jan Roskam
I've used www.pastebin.com  before, with C as the code. Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health,

Re: [R] Assigning entries to categories

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 8:54 AM, LogLord wrote: OK, thanks for the help! Here a more complex example: a=c(x,y,z) b=c(8,14,19) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c(cat1,cat2,cat3,cat4,cat5,cat6) b1=c(14,5,8,20,19,1) c_start=c(50,50,20,20,18000,60)

Re: [R] Assigning entries to categories

2010-07-05 Thread Gabor Grothendieck
On Mon, Jul 5, 2010 at 8:54 AM, LogLord nils.sch...@web.de wrote: OK, thanks for the help! Here a more complex example: a=c(x,y,z) b=c(8,14,19) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c(cat1,cat2,cat3,cat4,cat5,cat6) b1=c(14,5,8,20,19,1)

Re: [R] Assigning entries to categories

2010-07-05 Thread LogLord
Gabor Grothendieck wrote: On Mon, Jul 5, 2010 at 8:54 AM, LogLord nils.sch...@web.de wrote: OK, thanks for the help! Here a more complex example: a=c(x,y,z) b=c(8,14,19) c=c(200010,535388,19929) data=data.frame(a,b,c) d=c(cat1,cat2,cat3,cat4,cat5,cat6) b1=c(14,5,8,20,19,1)

[R] Plot with whispers

2010-07-05 Thread Ian Bentley
Hello! I need to make a plot with whispers that does the following. Reads in 50 files, each file containing 200 data points. A file looks like this: base100.log Send Receive 10.5 100.3 15.0 102.4 ... There are 100 lines, each with two data points. I need to read in the 50 files, and plot

Re: [R] Plot with whispers

2010-07-05 Thread Matt Shotwell
It looks like read.table is reading the first line as a data value, which is the default for read.table. Try using read.table with the argument header=TRUE. Also, consider using a box and whiskers plot for these data (?boxplot, ?lattice::bwplot). -Matt On Mon, 2010-07-05 at 12:08 -0400, Ian

[R] Can anybody help me understand AIC and BIC and devise a new metric?

2010-07-05 Thread LosemindL
Hi all, Could anybody please help me understand AIC and BIC and especially why do they make sense? Furthermore, I am trying to devise a new metric related to the model selection in the financial asset management industry. As you know the industry uses Sharpe Ratio as the main performance

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-05 Thread stephenb
the model fails to converge after more than 3 hours ( I went home so don't know how long it took) bigglm (formula = resp ~ relage+I(relage^2)+termfac+ri , + data = a, family = binomial(link='logit')); Large data regression model: bigglm(formula = resp ~ relage + I(relage^2) + termfac + ri,

[R] plotting data with ellipse confidence intervals

2010-07-05 Thread web reg
Hi, I would like to plot a set of paired means (as X Y data) with unique confidence intervals for each (creating a set of ellipses, each with it's own centre point and shape). Would appreciate any advice out there! Cheers, Ged [[alternative HTML version deleted]]

[R] Help reg Genome view

2010-07-05 Thread mahalakshmi sivamani
Hi, I have a set of genes and its chromosomal physical position in a text file. I want to view those genes in the chromosome using R package GenePlotter. Could any one please tell how to view this. Thanks in advance. Yours sincerely, S.Mahalakshmi [[alternative HTML version deleted]]

[R] Issue with write.table and read.table : I'm not getting out what I put in

2010-07-05 Thread Irina
Hello, I am trying to save a large matrix of values in a file. My problem is that I am writing write.table(allpos,'control_chr1.txt', dec=.) and then I want to check it with test2=read.table('control_chr1.txt') sum(test2[,2]==allpos[,2]) This last number is lower than the length of the

Re: [R] Passing the parameter (file name) to png()

2010-07-05 Thread Maulik Shah
Thanks a lot! Regards, Maulik On Sat, Jun 26, 2010 at 4:43 AM, jim holtman jholt...@gmail.com wrote: b - paste(C:\\rphp\\,arg, sep='') On Sat, Jun 26, 2010 at 12:55 AM, Maulik Shah maulik.shah2...@gmail.com wrote: I am fitting 3 parameter model to my response matrix and want to generate

Re: [R] Patch for legend.position={left,top,bottom} in ggplot2

2010-07-05 Thread Sebastian Wurster
Thank you for this nice patch! To incorporate it you have to open the ggplot2 file in path to your R packages\ggplot2\R, search for the first line of code and replace it with the patch. Don't forget to delete the lines with - and the + in front of the new code.

[R] To detect the location of duplicate values

2010-07-05 Thread Moohwan Kim
Dear R family, I have a question about how to detect some duplicate numeric observations. Suppose that I have two variables dataset. order value 1 0.52 2 0.23 3 0.43 4 0.21 5 0.32 6 0.32 7 0.32 8 0.32 9 0.32 10 0.12 11 0.46 12 0.09 13 0.32 14 0.25 ; Could you help me indicate where the

Re: [R] Issue with write.table and read.table : I'm not getting out what I put in

2010-07-05 Thread jim holtman
Why not use 'save' 'load'? On Mon, Jul 5, 2010 at 11:49 AM, Irina irina.kr...@epfl.ch wrote: Hello, I am trying to save a large matrix of values in a file. My problem is that I am writing write.table(allpos,'control_chr1.txt', dec=.) and then I want to check it with

Re: [R] To detect the location of duplicate values

2010-07-05 Thread Henrique Dallazuanna
Try this: DF[duplicated(DF$value),] On Mon, Jul 5, 2010 at 1:31 PM, Moohwan Kim kmhl...@gmail.com wrote: Dear R family, I have a question about how to detect some duplicate numeric observations. Suppose that I have two variables dataset. order value 1 0.52 2 0.23 3 0.43 4 0.21 5

Re: [R] To detect the location of duplicate values

2010-07-05 Thread jim holtman
try this x order value 1 1 0.52 2 2 0.23 3 3 0.43 4 4 0.21 5 5 0.32 6 6 0.32 7 7 0.32 8 8 0.32 9 9 0.32 1010 0.12 1111 0.46 1212 0.09 1313 0.32 1414 0.25 # go both ways to capture all duplicates

Re: [R] To detect the location of duplicate values

2010-07-05 Thread Joshua Wiley
Hello Moohwan, Look at ?duplicated for example: x [1] 1 1 2 2 3 3 duplicated(x) [1] FALSE TRUE FALSE TRUE FALSE TRUE If your end goal is to get rid of the duplicates, take a look at ?unique unique(x) [1] 1 2 3 Best Regards, Josh On Mon, Jul 5, 2010 at 9:31 AM, Moohwan Kim

Re: [R] Help reg Genome view

2010-07-05 Thread Martin Morgan
On 07/05/2010 08:51 AM, mahalakshmi sivamani wrote: Hi, I have a set of genes and its chromosomal physical position in a text file. I want to view those genes in the chromosome using R package GenePlotter. Could any one please tell how to view this. Hi S. Mahalakshmi, The package is

Re: [R] plotting data with ellipse confidence intervals

2010-07-05 Thread Peter Ehlers
On 2010-07-05 7:48, web reg wrote: Hi, I would like to plot a set of paired means (as X Y data) with unique confidence intervals for each (creating a set of ellipses, each with it's own centre point and shape). Would appreciate any advice out there! Cheers, Ged If you have only the means,

Re: [R] Can anybody help me understand AIC and BIC and devise a new metric?

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 10:35 AM, LosemindL wrote: Hi all, Could anybody please help me understand AIC and BIC and especially why do they make sense? Furthermore, I am trying to devise a new metric related to the model selection in the financial asset management industry. As you know the

Re: [R] Issue with write.table and read.table : I'm not getting out what I put in

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 11:49 AM, Irina wrote: Hello, I am trying to save a large matrix of values in a file. My problem is that I am writing write.table(allpos,'control_chr1.txt', dec=.) and then I want to check it with test2=read.table('control_chr1.txt') sum(test2[,2]==allpos[,2]) This last

Re: [R] Patch for legend.position={left,top,bottom} in ggplot2

2010-07-05 Thread Hadley Wickham
Or wait a couple of days for the next release of ggplot2... Hadley On Mon, Jul 5, 2010 at 11:28 AM, Sebastian Wurster sebastian.wurs...@gmx.de wrote: Thank you for this nice patch! To incorporate it you have to open the ggplot2 file in path to your R packages\ggplot2\R, search for the first

Re: [R] Issue with write.table and read.table : I'm not getting out what I put in

2010-07-05 Thread Peter Ehlers
On 2010-07-05 11:30, David Winsemius wrote: On Jul 5, 2010, at 11:49 AM, Irina wrote: Hello, I am trying to save a large matrix of values in a file. My problem is that I am writing write.table(allpos,'control_chr1.txt', dec=.) and then I want to check it with

Re: [R] Counting defined character within String

2010-07-05 Thread Charles C. Berry
On Mon, 5 Jul 2010, Kunzler, Andreas wrote: Dear list, I'm looking for a way to count the number of | within an object. The character | is used to separated ids. Assume a data (d) structure like Var NA NA NA NA NA 1 1|2 1|22|45 3 4b|24789 I need to know the maximum number of ids within one

Re: [R] To detect the location of duplicate values

2010-07-05 Thread Charles C. Berry
On Mon, 5 Jul 2010, Moohwan Kim wrote: Dear R family, I have a question about how to detect some duplicate numeric observations. Suppose that I have two variables dataset. order value 1 0.52 2 0.23 3 0.43 4 0.21 5 0.32 6 0.32 7 0.32 8 0.32 9 0.32 10 0.12 11 0.46 12 0.09 13 0.32 14

[R] export VTK from R : impossible to write data as float

2010-07-05 Thread alexandre pryet
Hello, I've written a short code (below) to write 3D unstructured grid to binary VTK files from R. Problem : I can only write integers with the command : data-as.numeric(c(3.3)) storage.mode(data)-'integer' writeBin(data,bfile_celldata,endian=swap) the function storage.mode(data)-'long' looks

Re: [R] Plot with whispers

2010-07-05 Thread Ian Bentley
Thanks Matt, I've been trying to get the data into a format that boxplot will accept, but I'm having trouble. If I read in my file directly data - read.table(base100.log) plot(data) It plots the Send data against the Receive data, using one as x, and one as y. That's not too surprising, so I

Re: [R] Plot with whispers

2010-07-05 Thread Dennis Murphy
Hi: This sounds like your standard error bar plot. Here's one way to get it, using lists, melt() from the reshape package and ggplot2. # Generate 50 fake data sets with 200 rows and variables send, receive: for(i in seq_len(50)) assign(paste('df', i, sep = ''), data.frame(send =

Re: [R] Some questions about R's modelling algebra

2010-07-05 Thread Kingsford Jones
On Fri, Jul 2, 2010 at 8:16 AM, Hadley Wickham had...@rice.edu wrote: ?formula in R 2.9.2 says in para 2: The %in% operator indicates that the terms on its left are nested within those on the right. For example a + b %in% a expands to the formula a + a:b. Ooops, missed that.  So b %in% a =

[R] selection of optim parameters

2010-07-05 Thread Fabian Gehring
Hi all, I am trying to rebuild the results of a study using a different data set. I'm using about 450 observations. The code I've written seems to work well, but I have some troubles minimizing the negative of the LogLikelyhood function using 5 free parameters. As starting values I am using

[R] data.frame: adding a column that is based on ranges of values in another column

2010-07-05 Thread Abdi, Abdulhakim
Dear List, I've been looking tirelessly for a solution to this dilemma but without success. Perhaps someone has an idea that will guide me in the right direction. Suppose I have the following data.frame: DF = data.frame(X = c(114.5508, 114.6468, 114.6596, 114.6957, 114.6828, 114.8903,

Re: [R] Can anybody help me understand AIC and BIC and devise a new metric?

2010-07-05 Thread Dennis Murphy
Hi: On Mon, Jul 5, 2010 at 7:35 AM, LosemindL comtech@gmail.com wrote: Hi all, Could anybody please help me understand AIC and BIC and especially why do they make sense? Any good text that discusses model selection in detail will have some discussion of AIC and BIC. Frank Harrell's

Re: [R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread RaoulD
Thank You David. Yes, I am using the lattice barchart and have managed to add data labels, however, they tend to be on the tip of each bar and are difficult to read as they are partially on the bar. Any help would be greatly appreciated. This is the code I am using:

[R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Przemek Grabowicz
Under MacOS I had R64 executive and it was clear. Under Ubuntu, which I do not have administrative rights to, there is only R executive. It seems that I can allocate more than 3GB of memory, however not everything seems to work the same/right as with R64 under MacOS. Pms.

Re: [R] unable to get bigglm working, ATTN: Thomas Lumley

2010-07-05 Thread stephenb
I decided to give it 1 more variable, which is strongly significant to help the optimization and it throws: bigglm (formula = resp ~ relage+relage2+termfac+ri+sn , + data = a, family = binomial(link='logit')); Error in bigglm.function(formula = resp ~ relage + relage2 + termfac + :

Re: [R] selection of optim parameters

2010-07-05 Thread Charles C. Berry
On Mon, 5 Jul 2010, Fabian Gehring wrote: Hi all, I am trying to rebuild the results of a study using a different data set. I'm using about 450 observations. The code I've written seems to work well, but I have some troubles minimizing the negative of the LogLikelyhood function using 5 free

Re: [R] Can anybody help me understand AIC and BIC and devise a new metric?

2010-07-05 Thread Kjetil Halvorsen
You should have a look at: Model Selection and Model Averaging Gerda Claeskens K.U. Leuven Nils Lid Hjort University of Oslo Among other this will explain that AIC and BIC really aims at different goals. On Mon, Jul 5, 2010 at 4:20 PM, Dennis Murphy djmu...@gmail.com wrote: Hi: On Mon, Jul

Re: [R] data.frame: adding a column that is based on ranges of values in another column

2010-07-05 Thread jim holtman
use 'merge': DF = data.frame(X = c(114.5508, 114.6468, 114.6596, 114.6957, 114.6828, 114.8903, 114.9519, 114.8842, + 114.8579, 114.8489), Y = c(47.14094, 46.98874, 46.91235, 46.88265, 46.80584, 46.67022, 46.53264, 46.47727, + 46.46457, 46.47032), Date = as.Date(c('2009-01-01', '2009-01-03',

Re: [R] data.frame: adding a column that is based on ranges of values in another column

2010-07-05 Thread Dennis Murphy
Hi: Since you've been looking tirelessly :) For your stated problem, the following will work: DF$Fortnight - with(DF, ifelse(Date %in% f.n1, 'FN1', ifelse(Date %in% f.n2, 'FN2', 'FN3'))) However, if you have a number of fortnights (perhaps stretching over several

[R] nested for loops

2010-07-05 Thread Senay ASMA
Dear Admin, I will appreciate if you advise me an effective way to write the following R code including nested for loops. I cannot do it by using expand.grid function because it results with memory allocation problems. Thanks for your time and consideration. for(d1 in 0:n){ for(d2 in 0:n){ for(d3

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Bernardo Rangel Tura
On Mon, 2010-07-05 at 19:25 +0200, Przemek Grabowicz wrote: Under MacOS I had R64 executive and it was clear. Under Ubuntu, which I do not have administrative rights to, there is only R executive. It seems that I can allocate more than 3GB of memory, however not everything seems to work the

Re: [R] To detect the location of duplicate values

2010-07-05 Thread Charles Berry
Charles C. Berry cberry at tajo.ucsd.edu writes: On Mon, 5 Jul 2010, Moohwan Kim wrote: Dear R family, I have a question about how to detect some duplicate numeric observations. Suppose that I have two variables dataset. order value 1 0.52 2 0.23 3 0.43 4 0.21 5

[R] Function to compute the multinomial beta function?

2010-07-05 Thread Gregory Gentlemen
Dear R-users, Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3) Thanks in advance

Re: [R] nested for loops

2010-07-05 Thread Romain Francois
Le 05/07/10 23:06, Senay ASMA a écrit : Dear Admin, I will appreciate if you advise me an effective way to write the following R code including nested for loops. I cannot do it by using expand.grid function because it results with memory allocation problems. Thanks for your time and

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Stuart Luppescu
On 月, 2010-07-05 at 19:25 +0200, Przemek Grabowicz wrote: Under MacOS I had R64 executive and it was clear. Under Ubuntu, which I do not have administrative rights to, there is only R executive. It seems that I can allocate more than 3GB of memory, however not everything seems to work the

[R] to remove duplicate values

2010-07-05 Thread Moohwan Kim
Dear R family, Suppose I have two series. order value 1 0.52 2 0.23 3 0.43 4 0.21 5 0.32 6 0.32 7 0.32 8 0.32 9 0.32 10 0.12 11 0.46 12 0.09 13 0.32 14 0.25 For these two series, I figured out the way to detect the locations of duplicate values. The next thing to do is remove the

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Przemek Grabowicz
On 07/05/2010 10:52 PM, Marcin Jaworski wrote: Try: .Machine$sizeof.pointer If you get 8, you are riding 64 bit R. If you get 4, your R is 32-bit one. I got 8, so should be 64 bits. But I have problems with some package, could it be that it is 32-bit? It was installed using: R CMD

[R] Memory problem in multinomial logistic regression

2010-07-05 Thread Daniel Wiesmann
Dear All I am trying to fit a multinomial logistic regression to a data set with a size of 94279 by 14 entries. The data frame has one sample column which is the categorical variable, and the number of different categories is 9. The size of the data set (as a csv file) is less than 10 MB. I

Re: [R] Function to compute the multinomial beta function?

2010-07-05 Thread Matt Shotwell
How about this? mbeta - function(...) { exp(sum(lgamma(c(...)))-lgamma(sum(c(... } gamma(5)*gamma(6)*gamma(7)/gamma(18) [1] 5.829838e-09 mbeta(5,6,7) [1] 5.829838e-09 On Mon, 2010-07-05 at 17:10 -0400, Gregory Gentlemen wrote: Dear R-users, Is there an R function to compute

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Stuart Luppescu
On 月, 2010-07-05 at 23:05 +0200, Przemek Grabowicz wrote: On 07/05/2010 10:52 PM, Marcin Jaworski wrote: Try: .Machine$sizeof.pointer If you get 8, you are riding 64 bit R. If you get 4, your R is 32-bit one. I got 8, so should be 64 bits. But I have problems with some package,

Re: [R] nested for loops

2010-07-05 Thread jim holtman
What do you want to do with the data being genereated? In the loop you have, it will just return the last value generated. Let me ask my favorite question: What is the problem you are trying to solve. If you get a memory problem with expand.grid, then if you are trying to store the values in

Re: [R] to remove duplicate values

2010-07-05 Thread Jannis
Some further tricks will (probably) lead you to your goal. I suppose you use duplicated() or something similar to get an array of locations of the duplicated values: pos.dup - whcih(duplicated(value)) then do diff.pos.dup - diff(pos.dup) and you get the indices to delete: pos.delete -

Re: [R] Data Labels in a barchart (Lattice or otherwise)

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 1:14 PM, RaoulD wrote: Thank You David. Yes, I am using the lattice barchart and have managed to add data labels, however, they tend to be on the tip of each bar and are difficult to read as they are partially on the bar. Any help would be greatly appreciated. This is

Re: [R] calculation on series with different time-steps

2010-07-05 Thread Jannis
Your question seem to me to be not precise enough for us to provide help. Do you need help with the if() syntax? If yes I would advice you to read some introductory R tutorial (like introduction to R (pdf, freely avalable on the net)) or some descent textbook. On quick hint for the correct

Re: [R] timeseries

2010-07-05 Thread Jannis
Please have a look at the posting guide of the list. How shall we help you withou an idea of what you have done? Please include reproducible code and sample data! nuncio m schrieb: Dear useRs, I am trying to construct a time series using as.ts function, surprisingly when I plot the data the x

Re: [R] Profiler for R ? (HFWUtils package)

2010-07-05 Thread Jim Callahan
Message: 21 Date: Mon, 5 Jul 2010 02:26:29 -0400 From: Ralf B ralf.bie...@gmail.com To: r-help@r-project.org r-help@r-project.org Subject: [R] Profiler for R ? Hi, is there such a thing as a profiler for R that informs about a) how much processing time is used by particular functions and

Re: [R] data.frame: adding a column that is based on ranges of values in another column

2010-07-05 Thread Bill.Venables
Here is one way checkList - data.frame(Day = c(f.n1, f.n2), + FN = rep(c(FN1,FN2), + c(length(f.n1), length(f.n2 m - match(DF$Date, checkList$Day) DF - cbind(DF, Fortnight = checkList$FN[m]) DF XY Date Fortnight 1

[R] Help in the legend()

2010-07-05 Thread Shant Ch
Hi R-users, I was plotting the differences of the variances of the three estimators- T^(1), T^(2), T^(3), ofcourse taking two at a time. I was using the expression() in the legend function in order to show which line correspond to which of the difference, but the following that I had used

Re: [R] Function to compute the multinomial beta function?

2010-07-05 Thread Robert A LaBudde
At 05:10 PM 7/5/2010, Gregory Gentlemen wrote: Dear R-users, Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) =

Re: [R] Help in the legend()

2010-07-05 Thread David Winsemius
On Jul 5, 2010, at 8:06 PM, Shant Ch wrote: Hi R-users, I was plotting the differences of the variances of the three estimators- T^(1), T^(2), T^(3), ofcourse taking two at a time. I was using the expression() in the legend function in order to show which line correspond to which of the

Re: [R] to remove duplicate values

2010-07-05 Thread Charles C. Berry
On Mon, 5 Jul 2010, Moohwan Kim wrote: Dear R family, Suppose I have two series. order value 1 0.52 2 0.23 3 0.43 4 0.21 5 0.32 6 0.32 7 0.32 8 0.32 9 0.32 10 0.12 11 0.46 12 0.09 13 0.32 14 0.25 For these two series, I figured out the way to detect the locations of duplicate

Re: [R] Memory problem in multinomial logistic regression

2010-07-05 Thread Charles C. Berry
On Mon, 5 Jul 2010, Daniel Wiesmann wrote: Dear All I am trying to fit a multinomial logistic regression to a data set with a size of 94279 by 14 entries. The data frame has one sample column which is the categorical variable, and the number of different categories is 9. The size of the

Re: [R] Help in the legend()

2010-07-05 Thread Shant Ch
Thanks Dr. Winsemius. Here's the toy data set. Basically pg = var(t^(3))-var(t^(2), gs = var(t^(2))-var(t^(1))and ps=var(t^(3))-var(t^(1)). The revised code and the data set is as follows: n-seq(4:13) pg-c(-1.241394e-03, -9.738079e-04, -7.158755e-04, -5.343962e-04, -4.088778e-04,

[R] nls + quasi-poisson distribution

2010-07-05 Thread Suresh Krishna
Hello R-helpers, I would like to fit a non-linear function to data (Discrete X axis, over-dispersed Poisson values on the Y axis). I found the functions gnlr in the gnlm package from Jim Lindsey: this can handle nonlinear regression equations for the parameters of Poisson and negative

[R] How to Plot With Different Marker ( ‘x ’ and ‘o’) Based on Condition in R

2010-07-05 Thread Gundala Viswanath
Dear Expert, I have a data that looks like this: for_y_axis -c(0.49534,0.80796,0.93970,0.8) for_x_axis -c(1,2,3,4) count -c(0,33,0,4) What I want to do is to plot the graph using for_x_axis and for_y_axis but will mark each point with o if the value is equal to 0(zero) and with x if