Re: [R] Lost in POSIX

2010-11-22 Thread Dimitri Shvorob
df$dt - as.Date(df$t) Thank you, David, but I need a *time* value. day was a confusing special case; how about min? -- View this message in context: http://r.789695.n4.nabble.com/Lost-in-POSIX-tp3052768p3053146.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] plot start at origin

2010-11-22 Thread Uwe Ligges
On 22.11.2010 07:44, Roslina Zakaria wrote: Hi r-users, I would like my axes to intersect at (0,0). I tried xaxs=i,yaxs=i but it does not change anything. I hope anybody can help me with this problem. Here is my code. use par(xaxs=i, yaxs=i) and then the rest of your code. UWe

[R] using rpart with a tree misclassification condition

2010-11-22 Thread meytar
Hello I want to build a classification tree for a binary response variable while the condition for the final tree should be : The total misclassification for each group (zero or one) will be less then 10% . for example: if I have in the root 100 observations, 90 from group 0 and 10 from group 1,

Re: [R] How to combine Date and time in one column

2010-11-22 Thread Uwe Ligges
On 22.11.2010 08:24, rnick wrote: Hello everyone, I am trying to built an xts object and i have run into some problems on the data handling. I would really appreciate if someone could help me with the following: 1) I have a OHLC dataset with Time and date in different columns. How could i

Re: [R] using rpart with a tree misclassification condition

2010-11-22 Thread Uwe Ligges
On 22.11.2010 08:32, meytar wrote: Hello I want to build a classification tree for a binary response variable while the condition for the final tree should be : The total misclassification for each group (zero or one) will be less then 10% . for example: if I have in the root 100

[R] how to loop through variables in R?

2010-11-22 Thread jas4710
After importing a table with M variables and N records, I'd like to calculate chi-square statistics, say, between N1, N2; N1, N3, ..., N1, Ni, and then N2, N3, ... N2, Ni, ..., Ni-1, Ni. Two loops should be ok but the manual online help don't show a systematic way to do so but instead show

Re: [R] how to loop through variables in R?

2010-11-22 Thread watashi
-Original Message- From: jas4710 wata...@post.com To: r-help@r-project.org Sent: Mon, Nov 22, 2010 4:11 pm Subject: [R] how to loop through variables in R? After importing a table with M variables and N records, I'd like to calculate chi-square statistics, say, between N1, N2; N1,

[R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread madr
my csv file is very simple - just one line for purpose of this test: 0{TAB}0 and read function is this: csvdata = read.csv(file=d:/s/test.csv,head=FALSE,sep=\t) then error comes: Error in source(d:/test.csv) : d:/test.csv:1:9: unexpected numeric constant 1: 0 0 but when I change

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread madr
the problem shows up only in console when script is loaded thru source() and separator character is eighter tab or space, strangely, when I'm running script directly form file in text environment everything is ok. [I'm reposing this because my previous post didn't get on the list because double

Re: [R] Lost in POSIX

2010-11-22 Thread Jeff Newmiller
Dimitri Shvorob wrote: df$dt - as.Date(df$t) Thank you, David, but I need a *time* value. day was a confusing special case; how about min? Your original question was NOT clear on this point... it was not David's fault your question was confusing, and you haven't even hinted at an

Re: [R] how to loop through variables in R?

2010-11-22 Thread Jeff Newmiller
wata...@post.com wrote: -Original Message- From: jas4710 wata...@post.com To: r-help@r-project.org Sent: Mon, Nov 22, 2010 4:11 pm Subject: [R] how to loop through variables in R? After importing a table with M variables and N records, I'd like to calculate chi-square statistics,

Re: [R] how to apply sample function to each row of a data frame?

2010-11-22 Thread Petr Savicky
On Sun, Nov 21, 2010 at 12:43:21PM -0800, wangwallace wrote: here is the data frame: a b c A B C [1,] 1 2 3 4 5 6 [2,] 7 8 9 10 11 12 [3,] 13 14 15 16 17 18 a, b, c are type I variables A, B, C are type II variables each row represent the data from one

[R] cpgram: access data, confidence bands

2010-11-22 Thread Henri Mone
Dear R experts, beginners and everyone else, I'm calculating cumulative periodogram using the command cpgram [1] from the MASS library. Here is a short example with the lh (hormone level) dataset: library(MASS) plot(lh,type=l,ylab=value,xlab=time, main=Hormone Levels (lh)) spectrum(lh,

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread Jeff Newmiller
madr wrote: my csv file is very simple - just one line for purpose of this test: 0{TAB}0 and read function is this: csvdata = read.csv(file=d:/s/test.csv,head=FALSE,sep=\t) then error comes: Error in source(d:/test.csv) : d:/test.csv:1:9: unexpected numeric constant 1: 0 0 but

[R] xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()

2010-11-22 Thread madr
code: op - par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0), tck = 0.01, mgp = c(0, -1.4, 0), mar=c(0,0,0,0)) plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(1,1,1, 0.5),yaxt=n, ann=FALSE) abline(v=c(min(x),max(x)),

Re: [R] xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()

2010-11-22 Thread madr
i found solution myself: par(xaxs = i, yaxs = i) - it sets axis ranges to actual data ranges sorry for question but maybe this will be easier to find if someone would be searching for this -- View this message in context:

Re: [R] xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()

2010-11-22 Thread Ivan Calandra
Hi! After plotting, take a look at par()$usr; it gives you the coordinates of the plotting region. You could use it that way: abline(v=c(par()$usr[1], par()$usr[2])...) Note that you can also use it like this: par(usr)[1] HTH, Ivan Le 11/22/2010 11:04, madr a écrit : code: op-

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread madr
The folder are the same, I just deleted the long path because it is irrelevant and by mistake left /s i one of the paths, they should be identical. I'm running this package: http://cran.r-project.org/bin/windows/base/R-2.12.0-win.exe on win xp 32 bit -- View this message in context:

Re: [R] Making a line in a legend shorter

2010-11-22 Thread Jim Lemon
On 11/22/2010 01:38 PM, Luis Felipe Parra wrote: Hello, I am putting a legend with lines in a line plot and I would like to make the lines in the legend shorter. Does anybody knows how to do this? Hi Felipe, The only rather clunky way I can think of is to use pch=- instead of lty or lwd.

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread Mike Marchywka
Date: Mon, 22 Nov 2010 01:57:54 -0800 From: jdnew...@dcn.davis.ca.us To: madra...@interia.pl CC: r-help@r-project.org Subject: Re: [R] unexpected numeric constant while reading tab delimited csv file madr wrote: my csv file is very simple

[R] how to sample lowess/loess into matrix ?

2010-11-22 Thread madr
code: x - rnorm(32) y - rnorm(32) plot(x,y) lines(lowess(x,y),col='red') Now I need to sample the lowess function into matrix where one series will be X and other will be values of lowess at particular X. -- View this message in context:

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread Duncan Murdoch
madr wrote: my csv file is very simple - just one line for purpose of this test: 0{TAB}0 and read function is this: csvdata = read.csv(file=d:/s/test.csv,head=FALSE,sep=\t) then error comes: Error in source(d:/test.csv) : d:/test.csv:1:9: unexpected numeric constant 1: 0 0 but

[R] Rexcel

2010-11-22 Thread Luis Felipe Parra
Hello I am new to RExcel and I would like to run a source code form the excel worksheet. I would like to run the following code source(C:\\Quantil Aplicativos\\Genercauca\\BackwardSelectionNC.r) from the excel wroksheet. Does anybody know how to do this? Thank you Felipe Parra

[R] how to change number of characters per line for print() to sink()?

2010-11-22 Thread Nevil Amos
I am using r to read and reformat data that is then saved to a text file using sink(), the file has a number of initial lines of comments and summary data followed by print of a data.frame with no row names. for example a-c(100:120) b-c(rnorm(100:120)) c-c(rnorm(200:220))

[R] Invitation à se connecter sur LinkedIn

2010-11-22 Thread Aline Uwimana via LinkedIn
LinkedIn Aline Uwimana requested to add you as a connection on LinkedIn: -- James, J'aimerais vous inviter à rejoindre mon réseau professionnel en ligne, sur le site LinkedIn. Aline Accept invitation from Aline Uwimana

Re: [R] How to combine Date and time in one column

2010-11-22 Thread Gabor Grothendieck
On Mon, Nov 22, 2010 at 2:24 AM, rnick nikos.rachma...@gmail.com wrote: Hello everyone, I am trying to built an xts object and i have run into some problems on the data handling. I would really appreciate if someone could help me with the following: 1) I have a OHLC dataset with Time and

[R] Tinn-R 2.3.7.0 released

2010-11-22 Thread Jose Claudio Faria
Dears users, A new version of Tinn-R was released today. Below details: 2.3.7.0 (Nov/22/2010) * Bug(s) fixed: - A bug related with the intermittent loose of connection (or appear to freeze) with Rgui.exe was fixed. * The versions 2.3.6.4, 2.3.6.5, 2.3.6.6 and 2.3.6.7

[R] Rexcel

2010-11-22 Thread Luis Felipe Parra
Hello, I am trying to use RExcel and I would like to know if it is possible to use in excel the following function I made for R Pron = function(path=C:\\Quantil Aplicativos\\Genercauca\\V5\\){ library(timeSeries) library(maSigPro) ### CARGAR FUNCIONES

Re: [R] how to change number of characters per line for print() to sink()?

2010-11-22 Thread jim holtman
?options width options(width = 1000) On Mon, Nov 22, 2010 at 7:22 AM, Nevil Amos nevil.a...@gmail.com wrote: I am using r to read and reformat data that is then saved to a text file using sink(), the file has a number of initial lines of comments and summary data followed by print of a

Re: [R] boxplot: reverse y-axis order

2010-11-22 Thread S Ellison
A simple alternative is to use at to contrl plot locations: boxplot( ..., at=rev(1:nlevels(depthM))) which just rearranges where they are plotted. Example: set.seed(1023) x - gl(5, 5) y-rnorm(25) boxplot(y~x, horizontal=TRUE) boxplot(y~x, at=rev(1:nlevels(x)), , horizontal=TRUE) Steve E

[R] plot inside function does not work

2010-11-22 Thread Alaios
Hello everyone, when I commit a plot using console(command line?) plot works fine. I have created a function that plots based on the input. This function is called plot_shad. When I call this function alone in the command line I get my plot. Then I tried to use another function as

Re: [R] how to sample lowess/loess into matrix ?

2010-11-22 Thread madr
I found it, it was SO simple: lowessline - lowess(x,y) write.csv(lowessline, loess.csv) -- View this message in context: http://r.789695.n4.nabble.com/how-to-sample-lowess-loess-into-matrix-tp3053458p3053601.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] plot inside function does not work

2010-11-22 Thread Claudia Beleites
Alex, this may be FAQ 7.22 Claudia On 11/22/2010 02:19 PM, Alaios wrote: Hello everyone, when I commit a plot using console(command line?) plot works fine. I have created a function that plots based on the input. This function is called plot_shad. When I call this function alone in the

Re: [R] Rexcel

2010-11-22 Thread Stephen Liu
Hi, For RExcel I would suggest subscribing; http://mailman.csd.univie.ac.at/listinfo/rcom-l They have a website on; http://rcom.univie.ac.at/ B.R. Stephen L - Original Message From: Luis Felipe Parra felipe.pa...@quantil.com.co To: r-help r-help@r-project.org Sent: Mon, November

Re: [R] plot inside function does not work

2010-11-22 Thread Alaios
Dear Claudia, I would like to thank you for your reply, according to 7.22 I have to put some print() statement inside my function. What I do not understand is where to put this line (at the beginning or at the end of the code?) I tried both but I get error message. Moreover I would like to ask

[R] Invitation à se connecter sur LinkedIn

2010-11-22 Thread Yann Lancien via LinkedIn
LinkedIn Yann Lancien requested to add you as a connection on LinkedIn: -- James, J'aimerais vous inviter à rejoindre mon réseau professionnel en ligne, sur le site LinkedIn. Yann Accept invitation from Yann Lancien

[R] Prob with merge

2010-11-22 Thread Joel
Hi Im trying to merge 2 data frames using merge but I dont get the result i want Lets make this a small test as my data set is to big to put in here :). t1-data.frame(a=c(1,2,3,4,5,6),b=c(11,11,NA,11,11,11)) t1-data.frame(a=c(1,2,3,4,5,8),b=c(12,12,12,12,12,32)) this gives me: t1 a b 1 1

Re: [R] Prob with merge

2010-11-22 Thread ONKELINX, Thierry
merge(t1,t2, by=a, all.x = TRUE) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research Institute for Nature and Forest team

Re: [R] Making a line in a legend shorter

2010-11-22 Thread Peter Ehlers
On 2010-11-21 18:38, Luis Felipe Parra wrote: Hello, I am putting a legend with lines in a line plot and I would like to make the lines in the legend shorter. Does anybody knows how to do this? I think the segment length is still hard-coded in legend(). Last July there was a request to

Re: [R] calculating martingale residual on new data using predict.coxph

2010-11-22 Thread Terry Therneau
This feature has been added in survival 2.36-1, which is now on CRAN. (2.36-2 should appear in another day or so) Terry T. -begin included message I was trying to use predict.coxph to calculate martingale residuals on a test data, however, as pointed out before

Re: [R] Prob with merge

2010-11-22 Thread Joel
Thx alot mate. -- View this message in context: http://r.789695.n4.nabble.com/Prob-with-merge-tp3053652p3053675.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] What if geoRglm results showed that a non-spacial model fits?

2010-11-22 Thread Jimmy Martina
Hi R-people: Working in geoRglm, it shows me, according to AIC criterion, that the non-spacial model describes the process in a better way. It's the first time that I'm facing up to. These are my results: OP2003Seppos.AICnonsp-OP2003Seppos.AICsp #[1] -4

[R] Help with plotting kohonen maps

2010-11-22 Thread Stella Pachidi
Dear all, I recently started using the kohonen package for my thesis project. I have a very simple question which I cannot figure out by myself: When I execute the following example code, from the paper of Wehrens and Buydens (http://www.jstatsoft.org/v21/i05/paper): R library(kohonen) Loading

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Kjetil Halvorsen
see below. 2010/11/21 Uwe Ligges lig...@statistik.tu-dortmund.de: On 21.11.2010 18:13, Kjetil Halvorsen wrote: ?save.image And at this point it has been running with one cpu at 100% for over an hour! It's OK to take an hour (due to memory - disc IO) if it uses swap space heavily.

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Mike Marchywka
Date: Mon, 22 Nov 2010 12:03:54 -0300 From: kjetilbrinchmannhalvor...@gmail.com To: lig...@statistik.tu-dortmund.de CC: r-help@r-project.org Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... see below. 2010/11/21 Uwe Ligges :

[R] hierarchical mixture modelling

2010-11-22 Thread Mike Lawrence
Hi folks, I have circular data that I'd like to model as a mixture of a uniform and a Von Mises centered on zero. The data are from 2 groups of human participants, where each participant is measured repeatedly within each of several conditions. So, the data frame would look something like:

[R] Check for is.object

2010-11-22 Thread Santosh Srinivas
Hello, I am trying to recursively append some data from multiple files into a common object For this, I am using in a loop NewObject - rbind(NewObject,tempObject) For the first loop, obviously there is no NewObject ... so I wanted to do NewObject - tempObject[0,] Now when it loops again I

[R] Fast Two-Dimensional Optimization

2010-11-22 Thread Wonsang You
Dear R Helpers, I have attempted optim function to solve a two-dimensional optimization problem. It took around 25 second to complete the procedure. However, I want to reduce the computation time: less than 7 second. Is there any optimization function in R which is very rapid? Best Regards,

Re: [R] plotting a timeline

2010-11-22 Thread Łukasz Ręcławowicz
2010/11/20 Marcin Gomulka mrgo...@gmail.com I'd rather do this with a dedicated package function ( like axis() ). Probably you have to write your own function, or tune up manually plot. plot(the_data$eventtime, abs(the_data$impact), type=h, frame.plot=FALSE, axes = FALSE, xlab=,ylab=,

Re: [R] memory profiling

2010-11-22 Thread Patrick Leyshock
Using: summaryRprof(memory=both) did the trick, thank you. I had not been using that setting when calling summaryRprof. Thanks, Patrick 2010/11/20 Uwe Ligges lig...@statistik.tu-dortmund.de On 19.11.2010 21:48, Patrick Leyshock wrote: I'm trying to configure Version 2.12.0 or R

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Kjetil Halvorsen
see below. On Mon, Nov 22, 2010 at 12:13 PM, Mike Marchywka marchy...@hotmail.com wrote: Date: Mon, 22 Nov 2010 12:03:54 -0300 From: kjetilbrinchmannhalvor...@gmail.com To: lig...@statistik.tu-dortmund.de CC: r-help@r-project.org Subject: Re:

Re: [R] An empty grey diagram

2010-11-22 Thread Martin Maechler
Stephen Liu sati...@yahoo.com on Sat, 20 Nov 2010 00:12:07 -0800 (PST) writes: Hi Josh and David, Problem solved. Both following steps work. 1) ToothGrowth attach(ToothGrowth) plot(dose,len) # this step is needed. Don't close the diagram. Otherwise

Re: [R] ?summaryRprof running at 100% cpu for one hour ...

2010-11-22 Thread Mike Marchywka
Date: Mon, 22 Nov 2010 12:41:06 -0300 Subject: Re: [R] ?summaryRprof running at 100% cpu for one hour ... From: kjetilbrinchmannhalvor...@gmail.com To: marchy...@hotmail.com CC: lig...@statistik.tu-dortmund.de; r-help@r-project.org see below.

Re: [R] Check for is.object

2010-11-22 Thread Jonathan P Daily
I think you want the function ?exists if(!exists(NewObject)) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have

Re: [R] solve nonlinear equation using BBsolve

2010-11-22 Thread Berend Hasselman
After my reply you sent me the following privately: Thank you for your respond. Now I adjust the parameters which are close to the value that I'm expected and it gives me the following message: I tried a few combination. My question is why it said Unsuccessful convergence but still give

Re: [R] Alternatives to image(...) and filled.contour(...) for 2-D filled Plots

2010-11-22 Thread Ista Zahn
Hi Jason, You do not say what you want the alternative to do, so its hard to know if this will be helpful. But one alternative is dat - as.data.frame(ak.fan) dat - melt(dat, id.vars=c(x, y)) p - ggplot(dat, aes(x=x, y=variable)) p + geom_tile(aes(fill=value)) -Ista On Sun, Nov 21, 2010 at 9:04

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-22 Thread Matt Shotwell
Martin, Pardon the delayed reply. Bootstrap methods have been around for some time (late seventies?), but their popularity seems to have exploded in correspondence with computing technology. You should be able to find more information in most modern books on statistical inference, but here is a

Re: [R] Check for is.object

2010-11-22 Thread Phil Spector
Santosh - The simple answer to your question is to initialize NewObject to NULL before the loop, i.e. newObject = NULL However, I should point out this is one of the most inefficient ways to program in R. A far better way is to allocate enough space for NewObject outside your loop,

Re: [R] negative alpha or custom gradient colors of data dots in scatterplot ?

2010-11-22 Thread Ista Zahn
Hi, I suggest taking a look at the plotting functions in the ggplot2 package. For example: x - rnorm(1) y - x+rnorm(1) dat - data.frame(x,y) library(ggplot2) p - ggplot(dat, aes(x=x, y=y)) p + geom_point() # too much overplotting: compare to dev.new() p + geom_hex(binwidth=c(.1,.1))

[R] Problem setting the number of digits in xtable

2010-11-22 Thread wphantomfr
DEar list members, I am currently using Sweave with LaTeX which is great. I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe. I have found an example on the net ith matrix and it works. For example this works

[R] RCurl : All connection are used ?

2010-11-22 Thread omerle
     Hi everybody, I got a problem with the ftpUpload function from the RCurl package. My goal is to Upload a lot of files from a local directory to a web server. 1st try : for (i in 1:length(file)){       ftpUpload(what=files[i],to=files[i]) } At i=11 I get : (my server has only 10

[R] sm.ancova graphic

2010-11-22 Thread Lucia Cañas
Hi R-Users, I am working with sm.ancova (in the package sm) and I have two problems with the graph, which is automatically generated when sm.ancova() is run. 1-Besides of the fitted lines, the observed data appeared automatically in the graph. I prefer that only fitted lines appear. I check

[R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread JiHO
Hi everyone, I want to plot a 3D interpolation of the concentration of aquatic organisms. My goal would be to have the result represented as clouds with a density proportional to the abundance of organisms, so that I could fly (well, swim actually ;) ) through the scene and see the patches here

Re: [R] RCurl : All connection are used ?

2010-11-22 Thread Mike Marchywka
I guess I would just comment that for many tasks I try to keep the work in dedicated tools. In this case, command line versions of curl or even wget. The reason is things like this that come up talking to foreign entitites. Also the learning curve can be amortized over many other efforts that

Re: [R] Ordeing Zoo object

2010-11-22 Thread Manta
And how about if I want to order the series from the smallest to the largest value, keeping the date index in order to see when the values were predominantly negative etc... Thanks, Marco -- View this message in context: http://r.789695.n4.nabble.com/Ordeing-Zoo-object-tp955868p3054192.html

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread Duncan Murdoch
On 22/11/2010 12:51 PM, JiHO wrote: Hi everyone, I want to plot a 3D interpolation of the concentration of aquatic organisms. My goal would be to have the result represented as clouds with a density proportional to the abundance of organisms, so that I could fly (well, swim actually ;) )

Re: [R] How to produce a graph of glms in R?

2010-11-22 Thread Greg Snow
Look at Predict.Plot (and possibly TkPredict) in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org]

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread Mike Marchywka
Date: Mon, 22 Nov 2010 13:55:13 -0500 From: murdoch.dun...@gmail.com To: jo.li...@gmail.com CC: r-h...@stat.math.ethz.ch Subject: Re: [R] Plotting a cloud/fog of variable density in rgl On 22/11/2010 12:51 PM, JiHO wrote: Hi everyone, I

Re: [R] data acquisition with R?

2010-11-22 Thread B.-Markus Schuller
Thanks a lot, Matt! I will have a look at the options you suggested. Cheers, Mango -- - Never run for the bus. Never skip tea. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Is it possible to make a matrix to start at row 0?

2010-11-22 Thread bogdanno
I want to make the matrix to be indexed from row (column) 0, not 1 Can I do that? How? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Find in R and R books

2010-11-22 Thread Georg Otto
Alaios ala...@yahoo.com writes: Also when I try to search in google using for example the word R inside the search lemma I get very few results as the R confuses the search engine. When I was looking something in matlab ofcourse it was easier to get results as the search engine performs

Re: [R] Lost in POSIX

2010-11-22 Thread Dimitri Shvorob
Nor would I call this much of an improvement in clarity... what about min? You want to know the minimum? LOL. (And apologies for the insensitivity). Thank you for help, Jeff. This works, but I am still curious to see a solution based on trunc, if anyone can find it. -- View this message in

[R] Some questione about plot

2010-11-22 Thread romzero
Q1: How can i draw LSD (Least significant difference) on a plot? Like this... http://r.789695.n4.nabble.com/file/n3053430/LSD.jpg Q2: How can i draw the axis secondary scale? Thanks for help. -- View this message in context:

Re: [R] question about constraint minimization

2010-11-22 Thread dhacade...@gmail.com
Hi, I have struggled on this bound optimization with equality constraint by using optim function for two days, but still fail to prepare a good input. Can anyone help to prepare the input for my specific case? Many thanks. Best, Hao On Sat, Nov 20, 2010 at 3:17 AM, Hans W Borchers [via R]

Re: [R] Rexcel

2010-11-22 Thread csrabak
Em 22/11/2010 10:11, Luis Felipe Parra escreveu: Hello I am new to RExcel and I would like to run a source code form the excel worksheet. I would like to run the following code source(C:\\Quantil Aplicativos\\Genercauca\\BackwardSelectionNC.r) from the excel wroksheet. Does anybody know how to

Re: [R] memory profiling

2010-11-22 Thread Patrick Leyshock
Using: summaryRprof(memory=both) did the trick, thank you. I had not been using that setting when calling summaryRprof. Thanks, Patrick 2010/11/20 Uwe Ligges lig...@statistik.tu-dortmund.de On 19.11.2010 21:48, Patrick Leyshock wrote: I'm trying to configure Version 2.12.0 or R to do

Re: [R] using rpart with a tree misclassification condition

2010-11-22 Thread meytar
Thank you for your prompt reply! Yes, I meant the apparent error rate. According to your advice, if I use rpart to build a full tree, what pruning command will be appropriate and will able me to add as an input to the pruning procedure the total error rate i'm looking for? Thank you very much

Re: [R] txtProgressBar strange behavior in R 2.12.0

2010-11-22 Thread Viechtbauer Wolfgang (STAT)
I believe nobody has responded to far, so maybe this is not a wide-spread issue. However, I have also encountered this since upgrading to R 2.12.0 (Windows 7, 64-bit). In my simulations where I use txtProgressBar(), the problem usually disappears after the bar has progressed to a certain

Re: [R] how to apply sample function to each row of a data frame?

2010-11-22 Thread wangwallace
I tried it. it works out perfectly. you save my life. -- View this message in context: http://r.789695.n4.nabble.com/Re-how-to-apply-sample-function-to-each-row-of-a-data-frame-tp3050933p3054117.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] arima

2010-11-22 Thread tomreilly
Nuncio, No, there is no requirement to subtract the mean. It is required that the residuals are N.I.I.D. (ie constant mean and constant variance). If you have an upward trending series, for example, then the series would need to be deseasonalized so that it is constant. There are many many

[R] how do remove those predictor which have p value greater than 0.05 in GLM?

2010-11-22 Thread shubha
Hi R user, I am a kind of an intermediate user of R. Now I am using GLM model (library MASS, VEGUS). I used a backward stepwise logistic regression, but i got a problem in removing those predictors which are above 0.05. I don't want to include those variables which were above 0.05 in final

[R] Wait for user input with readline()

2010-11-22 Thread Nathan Miller
Hello, I am trying write a script that includes a prompt for user input using readlines(). I am running into the problem that when I run readlines() as a single line the prompt works perfectly, but when I try to run a block of code which includes the readline function, the script doesn't wait for

[R] How to call web service in R

2010-11-22 Thread 夏高
Hello everyone, I would like to call web service in R, how can I do this? Thank you! Gao Xia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] save a regression model that can be used later

2010-11-22 Thread Ni, Melody Zhifang
Hi everyone I have a question about how to save a regression model in R and how to retrieve it for making predictions in a new session. To be more specific, I fitted a multilevel logistic regression model using the lmer from the lme4 package. I then successfully make predictions using

Re: [R] Is it possible to make a matrix to start at row 0?

2010-11-22 Thread Joshua Wiley
Hi, You can do it, but it would be very difficult (think reworking all indexing yourself) and you probably should not even try (nothing else that was expecting indexing to work as the R gods intended it to would work once you had done your rework). What has lead you to want to index from 0? If

Re: [R] question about constraint minimization

2010-11-22 Thread Ravi Varadhan
I do not understand the constraint x1 = x3 = x4. If this is correct, you only have 10 unknown parameters. If you can correctly formulate your problem, you can have a look at the packages alabama or BB. The function `auglag' in alabama or the function `spg' in BB may be useful. Ravi.

Re: [R] Is it possible to make a matrix to start at row 0?

2010-11-22 Thread Bert Gunter
Eh??? Why would you want to do that?? (R isn't C). So the simple answer is: you can't. The other answer is, well of course you sort of can via, e.g. for(i in 0:9) { z - myMatrix[i+1,] ... } But as Josh said, I think this falls into the class of You are just asking for trouble, so don't

Re: [R] RGoogleDocs stopped working

2010-11-22 Thread Harlan Harris
No joy for me. :( I'd had version 0.4-1 installed previously, and re-pulling that URL and reinstalling, plus setting RCurlOptions as specified, do not help for me. Exactly the same behavior. It doesn't matter whether I call getGoogleAuth directly or let getGoogleDocsConnection do it for me.

Re: [R] sm.ancova graphic

2010-11-22 Thread Peter Ehlers
On 2010-11-22 09:47, Lucia Cañas wrote: Hi R-Users, I am working with sm.ancova (in the package sm) and I have two problems with the graph, which is automatically generated when sm.ancova() is run. 1-Besides of the fitted lines, the observed data appeared automatically in the graph. I

Re: [R] Wait for user input with readline()

2010-11-22 Thread Joshua Wiley
Hi Nate, There may be better ways, but on the couple instances I've wanted to wait for keyboard input I used this type of paradigm: foo - function() { x - 1:10 y - rnorm(10) input - NA while(!isTRUE(input == 1) !isTRUE(input == 2)) { cat(Please type '1' if you want the first

Re: [R] Ordeing Zoo object

2010-11-22 Thread Gabor Grothendieck
On Mon, Nov 22, 2010 at 1:35 PM, Manta mantin...@libero.it wrote: And how about if I want to order the series from the smallest to the largest value, keeping the date index in order to see when the values were predominantly negative etc... If you just want to look at it in this order then:

Re: [R] Is it possible to make a matrix to start at row 0?

2010-11-22 Thread Ben Bolker
Bert Gunter gunter.berton at gene.com writes: Eh??? Why would you want to do that?? (R isn't C). So the simple answer is: you can't. The other answer is, well of course you sort of can via, e.g. for(i in 0:9) { z - myMatrix[i+1,] ... } But as Josh said, I think this falls

Re: [R] save a regression model that can be used later

2010-11-22 Thread David Winsemius
On Nov 22, 2010, at 10:02 AM, Ni, Melody Zhifang wrote: Hi everyone I have a question about how to save a regression model in R and how to retrieve it for making predictions in a new session. To be more specific, I fitted a multilevel logistic regression model using the lmer from the

[R] how to round only one column of a matrix ?

2010-11-22 Thread madr
round() function affects all values of a matrix, I want only to round column that is called 'y'. -- View this message in context: http://r.789695.n4.nabble.com/how-to-round-only-one-column-of-a-matrix-tp3054363p3054363.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Is it possible to make a matrix to start at row 0?

2010-11-22 Thread baptiste auguie
Apparently He who starts from 0 needn't be called unfortunate, fortune('indexed') baptiste On 22 November 2010 20:59, Ben Bolker bbol...@gmail.com wrote: Bert Gunter gunter.berton at gene.com writes: Eh??? Why would you want to do that?? (R isn't C). So the simple answer is: you can't.

Re: [R] how to round only one column of a matrix ?

2010-11-22 Thread Phil Spector
Is this what you're looking for? mymatrix = matrix(rnorm(15),5,3,dimnames=list(NULL,c('x','y','z'))) mymatrix x y z [1,] -0.4459162 -2.3936837 -0.7401963 [2,] 0.9886466 -1.3955161 -1.3390314 [3,] -0.2086743 1.7984620 -0.8532579 [4,] 1.0985411 0.9315553

Re: [R] How to call web service in R

2010-11-22 Thread Steve Lianoglou
Hi, On Mon, Nov 22, 2010 at 4:51 AM, 夏高 xiagao1...@gmail.com wrote: Hello everyone, I would like to call web service in R, how can I do this? Thank you! Is RCurl what you're looking for? http://cran.r-project.org/web/packages/RCurl/index.html -steve -- Steve Lianoglou Graduate Student:

[R] aggregate a Date column does not work?

2010-11-22 Thread Tan, Richard
Hi, I am trying to aggregate max a Date type column but have weird result, how do I fix this? a - rbind( + data.frame(name='Tom', payday=as.Date('1999-01-01')), + data.frame(name='Tom', payday=as.Date('2000-01-01')), + data.frame(name='Pete', payday=as.Date('1998-01-01')), +

[R] R2WinBUGS help

2010-11-22 Thread bmiddle
When I use the 'bugs' function from R, WinBUGS runs correctly, but R freezes. The only way to use R after this is to stop calculations (without my file that documents the calculation). However, I want to save the output in R so I can use it in further models. Does anyone know how to fix this

Re: [R] FW: help with time Series regression please

2010-11-22 Thread tomreilly
Cathy, How does this model look? [(1-B**4)]Y(T) = 20.767 +[X1(T)][(1-B**4)][(+ 56.1962)] :PULSE 7/ 4 I~P00028test

  1   2   >