Re: [R] Print plot to pdf, jpg or any other format when using scatter3d error

2011-01-04 Thread Uwe Ligges
On 04.01.2011 08:37, David Winsemius wrote: On Jan 3, 2011, at 8:17 PM, Jurica Seva wrote: Hi, I have been trying to output my graphs to a file (jpeg, pdf, ps, it doesnt matter) but i cant seem to be able to get it to output. I tried a few things but none of them worked and am lost as what

[R] Odp: how to subset unique factor combinations from a data frame.

2011-01-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.01.2011 05:21:25: Hi All I have these questions and request members expert view on this. a) I have a dataframe (df) with five factors (identity variables) and value (measured value). The id variables are Year, Country, Commodity,

Re: [R] Please, need help with a plot

2011-01-04 Thread Uwe Ligges
On 03.01.2011 14:25, Victor F Seabra wrote: although the code somehow didn't work on my Vista / R 2.8, it did work perfectly on a XP machine / R 2.10 An when you update both machines to a recent R-2.12.1 you will find how much more will work in the end! Uwe Ligges I've been trying to

[R] Default Working directory on windows 7?

2011-01-04 Thread W Eryk Wolski
Hi, Just installed R on a new Windows 7 machine (as admin). I feel quite uncomfortable knowing that the default WD when starting R is: getwd() [1] C:/Windows/system32 I guess I did something wrong when installing R... How to change R's default working directory? regards Eryk

Re: [R] Default Working directory on windows 7?

2011-01-04 Thread Michael Sumner
Change the Start in: property on the shortcut you used to start R with. Right-click on the R icon and click Properties (you may need to right click once, then again if you are using the pinned start menu icon in Windows 7). Then when you start R again with that shortcut it will use the directory

[R] Fw: Re: Default Working directory on windows 7?

2011-01-04 Thread Amy Milano
Suppose your working R directory is C:\My Working Directory I hope now that you have installed the R, you must be having R ICON on your desktop. Right click on this icon, then click on Properties. Once that box is opened, you will find a tab called Start in. There within the type C:\My

[R] lattice: how to center a title?

2011-01-04 Thread Marius Hofert
Dear expeRts, As you can see from this example... trellis.device(pdf, width = 5, height = 5) print(xyplot(0 ~ 0, main = This title is not 'centered' for the human's eye, scales = list(alternating = c(1,1), tck = c(1,0 dev.off() ... the title does not seem to be centered for the human's

[R] Odp: Default Working directory on windows 7?

2011-01-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.01.2011 10:35:23: Hi, Just installed R on a new Windows 7 machine (as admin). I feel quite uncomfortable knowing that the default WD when starting R is: getwd() [1] C:/Windows/system32 Something was set incorrectly. I believe that

Re: [R] how to subset unique factor combinations from a data frame.

2011-01-04 Thread SNV Krishna
Hi, Sorry that my example is not clear. I will give an example of what each variable holds. I hope this clearly explains the case. Names of the dataframe (df) and description Year :- Year is calendar year, from 1980 to 2010 Country :- is the country name, total no. (levels) of countries is ~

[R] Writing do and resample functions

2011-01-04 Thread Ben Ward
Hi, I'm trying to take a function from a workspace download provided in a stats textbook book, so I have it in my workspace to use all the time. I opened the workspace and typed the names of the two functions to get the code that makes them up:

[R] RSQLite to input dataframe

2011-01-04 Thread Amy Milano
Dear r helpers, At first, I apologize for raising a query which seems to be a stupid interpretation on my part. I am trying to learn SQLite. Following is an example given in the RSQLite.zip file (Page # 4) drv - dbDriver(SQLite) tfile - tempfile() con - dbConnect(drv, dbname = tfile)

Re: [R] how to invert the axes in the wireframe() plot

2011-01-04 Thread Simone Gabbriellini
thank you very much, I am now closer to the result I would like to achieve. Still, I have to figure out how to invert the n axes, see figure: http://www.digitaldust.it/materiali/mine2.pdf is panel.3dwire the function I have to study for this last step? thanks, simone Il giorno 04/gen/2011,

[R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread Marius Hofert
Dear expeRts, I usually use par.settings = standard.theme(color = FALSE) to create lattice graphics without colors, so something like library(lattice) x - runif(10) xyplot(x ~ 1:10, type = l, par.settings = standard.theme(color = FALSE)) Now I would like to use an additional component in

Re: [R] how to subset unique factor combinations from a data frame.

2011-01-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.01.2011 11:19:02: Hi, Sorry that my example is not clear. I will give an example of what each variable holds. I hope this clearly explains the case. Names of the dataframe (df) and description Year :- Year is calendar year, from 1980 to

[R] 95% CI of the Predicted values from the GLS Model

2011-01-04 Thread Mangalani Peter Makananisa
Dear all, I have just constructed the GLS model in R . How do I print the 95% confidence intervals for the vector of predicted values R code/s for GLS CI? See the model below: Please advice Regards Peter South Africa +2712 422 7357 +2782 456 4669 Generalized

Re: [R] RSQLite to input dataframe

2011-01-04 Thread Michael Bedward
Hi Amy, I'm not sure if I understand your question correctly so let me know if the following is off track. Starting with your example, here is how to create a data.frame and write it to a new table in a new database file... my.data = data.frame(X = c(US, UK, Canada, Australia, Newzealand), Y =

Re: [R] Saving objects inside a list

2011-01-04 Thread Olivier ETERRADOSSI
Message: 42 Date: Mon, 3 Jan 2011 18:58:04 -0200 From: Eduardo de Oliveira Hortaeduardo.oliveiraho...@gmail.com To: r-helpr-help@r-project.org Subject: Re: [R] Saving objects inside a list Message-ID: aanlktimbxmr0rusiws1grorhjh=wstofzqdoc-90z...@mail.gmail.com Content-Type: text/plain

[R] Listing of available functions

2011-01-04 Thread Sébastien Bihorel
Dear R-users, Is there a easy way to access to a complete listing of available functions from a R session? The help.start() and ? functions are great, but I feel like they require the user to know the answer in advance (especially with respect to function names)... I could not find a easy way to

Re: [R] Writing do and resample functions

2011-01-04 Thread Erich Neuwirth
It seems that the textbook workspace you are using as a method definition for * for class repeater. Load the workspace and try methods(`*`) If you get something like '*.repeater' this suspicion is confirmed On 1/4/2011 11:36 AM, Ben Ward wrote: Hi, I'm trying to take a function from a

Re: [R] RSQLite to input dataframe

2011-01-04 Thread Andreas Borg
Hi Amy, Suppose I have a dataframe as given below. DF = data.frame(X = c(US, UK, Canada, Australia, Newzealand), Y = c(52, 36, 74, 10, 98)) drv - dbDriver(SQLite) tfile - tempfile() con - dbConnect(drv, dbname = tfile) data(DF) dbWriteTable(con, ..., ...) # Didn't know what to write

Re: [R] Listing of available functions

2011-01-04 Thread Matthew Dowle
Try : objects(package:base) Also, as it happens, a new package called unknownR is in development on R-Forge. It's description says : Do you know how many functions there are in base R? How many of them do you know you don't know? Run unk() to discover your unknown unknowns. It's fast and

Re: [R] Listing of available functions

2011-01-04 Thread Henrique Dallazuanna
Try this: sapply(search(), ls, all.names = TRUE) This show all the functions in the search() path On Tue, Jan 4, 2011 at 10:13 AM, Sébastien Bihorel pomc...@free.fr wrote: Dear R-users, Is there a easy way to access to a complete listing of available functions from a R session? The

Re: [R] Writing do and resample functions

2011-01-04 Thread Ben Ward
I've just loaded the workspace and done methods('*') And got the ouptut [1] *.difftime *.repeater I'm not entirely sure on what this repeater and as.repeater is. From my reading when one want to repeat stuff for say bootstrapping, you have to use repeat as part of a function and put in some

Re: [R] Help with For instruction

2011-01-04 Thread ADias
Hi thank you all. I think I have what I need to solve my problem. Regards, A.Dias -- View this message in context: http://r.789695.n4.nabble.com/Help-with-For-instruction-tp3173074p3173386.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Thank you! But i'm wondering: if you run area - factor(area, levels=c(C, A,B,D,E,F) ) then you are transforming only 'area', aren't you? isn't it possible to transform the whole data like i did for agecat but now for area and area C as baseline, or are you doing so when you run

[R] S4 plot function (Package)...

2011-01-04 Thread Daniel Kosztyla
Hello, I have a problem programming 2 plot methods for 2 classes. 1. I have 2 classes. Each class has its own plot method. !!! How the plot,xxx-method.R -files have to look like, so that the plot method for class 1 und plot methods for class 2 can act for each belonging class. Prob My

Re: [R] RSQLite to input dataframe

2011-01-04 Thread Amy Milano
Dear sir, When I was going through RSQLite.pdf file, I was just wondering if at all I will understand this. But you have explained it in such a simple and lucid manner, that although I am yet to go thoroughly through the mail, I am filled with confidence that yes now i can do it and I am going

Re: [R] ARIMA simulation including a constant

2011-01-04 Thread Prof Brian Ripley
That output is not from arima(), which is the function paired with arima.sim(). Nor is it from arima0(), so I don't believe it is 'ouptut from R' (perhaps from a contributed package you have not mentioned?). With arima(), the intercept is 'm' in the notation on the help page and not 'a' in

Re: [R] how to subset unique factor combinations from a data frame.

2011-01-04 Thread Dennis Murphy
Hi: Did you try something like summdf - as.data.frame(with(df, table(Commodity, Attribute, Unit))) ? The rows of the table should represent the unique combinations of the three variables Here's a simple toy example to illustrate: x - sample(LETTERS[1:6], 1000, replace = TRUE) xx -

[R] how to keep keep matching column in output of merge

2011-01-04 Thread Nevil Amos
How do I keep the linking column[s] in a merge()? I need to use the values again in a further merge. thanks Nevil Amos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Print plot to pdf, jpg or any other format when using scatter3d error

2011-01-04 Thread Duncan Murdoch
On 03/01/2011 8:17 PM, Jurica Seva wrote: Hi, I have been trying to output my graphs to a file (jpeg, pdf, ps, it doesnt matter) but i cant seem to be able to get it to output. As Uwe said, you are using rgl graphics, not base graphics. So none of the standard devices work, you need to use

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 5:57 AM, Marius Hofert wrote: Dear expeRts, I usually use par.settings = standard.theme(color = FALSE) to create lattice graphics without colors, so something like library(lattice) x - runif(10) xyplot(x ~ 1:10, type = l, par.settings = standard.theme(color = FALSE))

Re: [R] Listing of available functions

2011-01-04 Thread Duncan Murdoch
On 04/01/2011 7:13 AM, Sébastien Bihorel wrote: Dear R-users, Is there a easy way to access to a complete listing of available functions from a R session? The help.start() and ? functions are great, but I feel like they require the user to know the answer in advance (especially with respect to

Re: [R] Listing of available functions

2011-01-04 Thread David Winsemius
You can also search for a cheatsheet. There are several out there searching on cheatsheet r This one at Oregon State is presented as a web page http://www.science.oregonstate.edu/~shenr/Rhelp/00cheat.htm Others are available as pdf's. On Jan 4, 2011, at 7:13 AM, Sébastien Bihorel wrote:

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread Marius Hofert
Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Cheers, Marius On 2011-01-04, at 14:32 , David Winsemius wrote: On Jan 4, 2011, at 5:57 AM, Marius Hofert wrote:

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 7:50 AM, Louisa wrote: Thank you! But i'm wondering: if you run area - factor(area, levels=c(C, A,B,D,E,F) ) then you are transforming only 'area', aren't you? isn't it possible to transform the whole data like i did for agecat but now for area and area C as baseline,

Re: [R] lasso/lars error

2011-01-04 Thread F1Tim
I'm having the same error too, but it's very rare though... (especially when using datasets with many variables, say 25). A somewhat odd, but seemingly effective, way to solve this, is by writing try(lars(x,y),silent = T). The try-command in this shape will not generate an error on the console

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Ben Bolker
Nevil Amos nevil.amos at gmail.com writes: How do I keep the linking column[s] in a merge()? I need to use the values again in a further merge. simple reproducible example please? (e.g. make up a couple of 4-row datasets that show what you want, what you are trying, and what you are

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Sarah Goslee
Hi Nevil, We really need an example here of what you're doing, since merge() does keep the id column by default. x - data.frame(id = c(a, b, c, d), x=c(1,2,3,4)) y - data.frame(id = c(b, a, d, c), y=c(101, 102, 103, 104)) merge(x, y) id x y 1 a 1 102 2 b 2 101 3 c 3 104 4 d 4 103

Re: [R] Saving objects inside a list

2011-01-04 Thread Eduardo de Oliveira Horta
Hello, (and a happy new year for you too!) Apparently the problem is happening only within my RKWard sessions: B = 1000 oblist = as.list(.GlobalEnv) str(oblist) List of 1 $ B:function (value) oblist$B function (value) { if (!missing(value)) { assign(k, value, envir =

[R] How to make a Cluster of Clusters

2011-01-04 Thread Diego Pujoni
Dear R-help, In my Master thesis I measured 10 variables from 18 lakes. These measurements were taken 4 times a year in 3 depths, so I have 12 samples from each lake. I know that 12 samples can not be treated as replications, since they don't correspond to the same environmental characteristics

[R] Calendar in R-program

2011-01-04 Thread LOON88
Hey. I have to do calendar in program R. I was looking for examples on this forum but havent found it. Can someone help me in this thing ? I would be really appreciate for that. Calendar should be the same as we have in Windows but I really dont know how to begin it. Hope u can show me the best

[R] [R-pkgs] plyr 1.4

2011-01-04 Thread Hadley Wickham
# plyr plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of

[R] [R-pkgs] reshape2 1.1

2011-01-04 Thread Hadley Wickham
Reshape2 is a reboot of the reshape package. It's been over five years since the first release of the package, and in that time I've learned a tremendous amount about R programming, and how to work with data in R. Reshape2 uses that knowledge to make a new package for reshaping data that is much

[R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
(1) I know that \n when used in cat, e.g. cat(\n) produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Thank you again David! I did not try it yet, cause neither the dataset nor R is on this computer. I'll try it in a few hours, as soon as possible, when I'm on my personal computer. I'll let you know if it works. I'm really curious! Thank you for your time! Best Wishes, Louisa -- View this

[R] uroot Package and R 2.12.1

2011-01-04 Thread CALEF ALEJANDRO RODRIGUEZ CUEVAS
Hello friends. I'm wondering what happened to package uroot. I worked quite well with older versions of R, however with 2.12.1 version it simply doesn't work. The worst thing is that I look for it in the contributed packages and it simply doesn't appear. I want to develop ADF test with

Re: [R] uroot Package and R 2.12.1

2011-01-04 Thread Uwe Ligges
On 04.01.2011 16:15, CALEF ALEJANDRO RODRIGUEZ CUEVAS wrote: Hello friends. I'm wondering what happened to package uroot. I worked quite well with older versions of R, however with 2.12.1 version it simply doesn't work. The worst thing is that I look for it in the contributed packages and

[R] an error about JRI

2011-01-04 Thread ying zhang
Hi everyone, I try to run my R script in Java, thus I installed JRI. and run the example, I am using Eclipse on 64 bits windows 7. part of the example code is as follows: public static void main(String[] args) { System.out.println(Creating Rengine (with arguments));

Re: [R] lattice: how to center a title?

2011-01-04 Thread Dieter Menne
mhofert wrote: trellis.device(pdf, width = 5, height = 5) print(xyplot(0 ~ 0, main = This title is not 'centered' for the human's eye, scales = list(alternating = c(1,1), tck = c(1,0 dev.off() ... the title does not seem to be centered for the human's eye [although it is centered

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 8:39 AM, Marius Hofert wrote: Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Quite right. I didn't see that until you pointed it out. I had

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Dieter Menne
Axolotl9250 wrote: ... resampled_ecoli = sample(ecoli, 500, replace=T) coefs = (coef(lm(MIC. ~ 1 + Challenge + Cleaner + Replicate, data=resampled_ecoli))) sd(coefs) ... Below a simplified and self-consistent version of your code, and some changes Dieter # resample d =

Re: [R] randomForest speed improvements

2011-01-04 Thread Liaw, Andy
If you have multiple cores, one poor man's solution is to run separate forests in different R sessions, save the RF objects, load them into the same session and combine() them. You can do this less clumsily if you use things like Rmpi or other distributed computing packages. Another

[R] Cost-benefit/value for money analysis

2011-01-04 Thread Graham Smith
I assume this has a proper name, but I don't know what it is and wondered if anyone knew of a package that might do the following, or something similar. As an example, assume I have borrowed and read 10 books on R , and I have subjectively given each of them a value score in terms of how useful

Re: [R] an error about JRI

2011-01-04 Thread Prof Brian Ripley
AFAIK JRI is part of rJava (and you installed rJava), which has its own mailing list: plasea use it. (http://rosuda.org/lists.shtml, I believe). There are tricky things with JRI on multi-architecture platforms, so you do need to be sure you are using the right versions (and rJava 0.8-8 is

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 11:08 AM, David Winsemius wrote: On Jan 4, 2011, at 8:39 AM, Marius Hofert wrote: Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Quite

[R] plot without points overlap

2011-01-04 Thread joonR
Hi, I'm trying to plot a grid of points of different dimensions using the simple plot() function. I want to plot the points such that they DO NOT overlap, I guess there should be a way to set a maximum distance between the points, but I cannot find it. Can you help? Thanks a lot! g PS: Is it

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread Marius Hofert
Dear David, that's funny to read. I guess we did pretty much the same. I also thought I got the list structure wrong and I also tried c()... (since I recently learned from Gabor that a list is only a vector of mode list) and I also searched for posts with exactly the same words [but wasn't

[R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
(1) I know that \n when used in cat, e.g. cat(\n) produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R

Re: [R] Page eject and clearing the console

2011-01-04 Thread Henrique Dallazuanna
Take a look on: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/8463.html On Tue, Jan 4, 2011 at 2:54 PM, John Sorkin jsor...@grecc.umaryland.eduwrote: (1) I know that \n when used in cat, e.g. cat(\n) produces a line feed (i.e. skips to the next line). Is there any escape sequence that will

Re: [R] Page eject and clearing the console

2011-01-04 Thread Sarah Goslee
Hi John, I don't understand what you mean by top of the next page, or rather, how that differs from clearing the screen. And for the latter, that is dependent on OS, and on GUI/console usage, and has been discussed several times on the list. The easiest solution is to invoke the system command

Re: [R] Help with For instruction

2011-01-04 Thread ADias
Hi, Still with the above problem: But for instance, i have a data base with 30 variables and I created an object each with one varibale missing: DataBase - has 30 variables DataBase1 has 29 variables with the 1st variable gone DataBase2 has 29 variables with the 2nd variable gone for(i in

Re: [R] Saving objects inside a list

2011-01-04 Thread Eduardo de Oliveira Horta
Hello, I've contacted the guys from RKWard. Below I paste the answer Thomas Friedrichsmeier gave me. --- Hi, the problem appears to be our use of active bindings (see ?makeActiveBinding). Internally, RKWard replaces all objects inside .GlobalEnv by active bindings. This allows us to find

Re: [R] Page eject and clearing the console

2011-01-04 Thread Gabor Grothendieck
On Tue, Jan 4, 2011 at 9:48 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: (1) I know that \n when used in cat, e.g. cat(\n) produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the

Re: [R] plot without points overlap

2011-01-04 Thread Joshua Wiley
Hi, You can set the device region in inches using the pin argument (see ?par maybe halfway down or so). You can also set the aspect ratio in plot(), but I am not sure that is really what you want (see ?plot.window for that). Two Examples ### par(pin = c(2, 4)) plot(1:10) dev.off()

Re: [R] lattice: how to center a title?

2011-01-04 Thread mhofert
Dear Dieter, many thanks, exactly what I was looking for. Cheers, Marius -- View this message in context: http://r.789695.n4.nabble.com/lattice-how-to-center-a-title-tp3173271p3173931.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Calendar in R-program

2011-01-04 Thread Mark Sharp
Look at the lubridate package from Hadley Wickham for great basic routines for handling date objects. Mark R. Mark Sharp, Ph.D. msh...@sfbr.orgmailto:msh...@sfbr.org On Jan 4, 2011, at 8:02 AM, LOON88 wrote: Hey. I have to do calendar in program R. I was looking for examples on this forum

Re: [R] packagename:::functionname vs. importFrom

2011-01-04 Thread Frank Harrell
Thanks Luke. By the namespace from which you import is loaded when your package is I take it that you are saying that all such referenced packages are loaded up front, which is not what I hoped. And it's too bad you can't import unexported objects, as that rather defeats the purpose of

Re: [R] packagename:::functionname vs. importFrom

2011-01-04 Thread Frank Harrell
Thanks Hadley, Luke, Martin, and Bill. Bill captured the essence of my reasons for needing an unexported function. Other reasons include occasional overrides of dispatching rules, and providing parallel versions of some functions that exist in other packages to make them easier to use in some

Re: [R] Help with For instruction

2011-01-04 Thread André Dias
hi how do I exactly use the get(). I am reading the help for get() but the way I am using it causes an error/ thanks ADias 2011/1/4 Sarah Goslee sarah.gos...@gmail.com With get(). On Tue, Jan 4, 2011 at 11:58 AM, ADias diasan...@gmail.com wrote: Hi, Still with the above problem:

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
Ok I'll check I understand: So it's using sample, to resample d once, 10 values, because the rnorm has 10 values, with replacement (I assume thats the TRUE part). Then a for loop has this to resample the data - in the loop's case its 1000 times. Then it does a lm to get the coefficients and add

Re: [R] Help with For instruction

2011-01-04 Thread Sarah Goslee
2011/1/4 André Dias diasan...@gmail.com: hi how do I exactly use the get(). I am reading the help for get() but the way I am using it causes an error/ So how are you using it? It's so much easier to explain what you're doing wrong if I know what you're doing. Without a reproducible example

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Dear David, It works! Thank you so much for your help! Louisa -- View this message in context: http://r.789695.n4.nabble.com/Inverse-Gaussian-Distribution-tp3172533p3174015.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Help with For instruction

2011-01-04 Thread Greg Snow
If you had followed David's advice and put everything into a list or other structure instead of using the assign function (see fortune(236)) then you could just access the list element instead of needing get. In the long run (or even medium and short run) life will be much easier for you if

Re: [R] Help with For instruction

2011-01-04 Thread André Dias
Hi I was doing for (i in 1:length(database)) assign(paste(distancematrix,i,sep=), dist(paste(get(database, i, sep=) but i really did not know what I was doing. I will try your way. But I still don't understnad how the get function works. What woud be more r-ish then get() ? thanks ADias

Re: [R] Help with For instruction

2011-01-04 Thread Sarah Goslee
You need to swap the get and paste commands - paste() creates the string filename that get() acts on. As already explained, using a list is much nicer. Sarah 2011/1/4 André Dias diasan...@gmail.com: Hi I was doing for (i in 1:length(database)) assign(paste(distancematrix,i,sep=),

Re: [R] Calendar in R-program

2011-01-04 Thread Spencer Graves
If all you want is a calendar Date, the simplest may be the Date class in the base package. Try help('as.Date'). Dates and times can be extremely difficult to use for many reasons. For example, some months have 30 days, others have 31, and February usually has 28 days, but

Re: [R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the next page, i.e. cat(\n) skips to the next line, is there an equivalent way to skip to the top of the

Re: [R] Page eject and clearing the console

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 1:19 PM, John Sorkin wrote: I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the next page, i.e. cat(\n) skips to the next line, is

Re: [R] Page eject and clearing the console

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 1:27 PM, David Winsemius wrote: On Jan 4, 2011, at 1:19 PM, John Sorkin wrote: I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the

Re: [R] Page eject and clearing the console

2011-01-04 Thread Bert Gunter
Perhaps merely rephrasing David's comments, page is not a meaningful physical entity -- it depends on font size, line spacing, etc. and the physical size of the output surface, which has no meaning for an infinitely (or at least up to tyhe screen buffer's limit) scrollable screen viewing area.

[R] XTS : merge.xts seems to have problem with character vectors

2011-01-04 Thread rivercode
Hi, Please can you tell me what I am doing wrong. When trying to merge two xts objects, one of which has multiple character vectors for columns...I am just getting NAs. str(t) POSIXct[1:1], format: 2011-01-04 11:45:37 y2 = xts(matrix(c(letters[1:10]),5), order.by=as.POSIXct(c(t + 1:5)))

[R] Navigating web pages using R

2011-01-04 Thread Erik Gregory
R-Help, I'm trying to obtain some data from a webpage which masks the URL from the user, so an explicit URL will not work. For example, when one navigates to the web page the URL looks something like: http://137.113.141.205/rpt34s.php?flags=1 (changed for privacy, but i'm not sure you could

Re: [R] XTS : merge.xts seems to have problem with character vectors

2011-01-04 Thread Joshua Ulrich
On Tue, Jan 4, 2011 at 12:42 PM, rivercode aqua...@gmail.com wrote: Hi, Please can you tell me what I am doing wrong.  When trying to merge two xts objects, one of which has multiple character vectors for columns...I am just getting NAs. str(t)  POSIXct[1:1], format: 2011-01-04 11:45:37

Re: [R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
I am looking for something which will emulate the following: Back in the old days, when printing to a line printer, the first two characters in a line controlled printing. For example, a line starting with 1h1 starts printing at the top of the next page. 1h+ indicates overprinting 1h0 results in

[R] R implementation of S-distribution

2011-01-04 Thread Seth W Bigelow
I'm working with data that can exhibit either strong right- or left-skew. I understand the S-distribution is useful in such cases (e.g., Voit and Schwacke, 2000. Random Number Generation from Right-Skewed, Symmetric, and Left-Skewed Distributions. Risk Analysis 20 (1): 59-71). Does anyone know

Re: [R] Non-uniformly distributed plot

2011-01-04 Thread Eric Hu
Hi Dennise, David and Jorge, I hope you all had a great holiday season. Thank you so much for the good comments. I think all your suggestions are sufficient for my current needs. I guess it is safe to say that there is no easy way to plot the data according to the x-axis range. By the way,

[R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Dear R-users, Is there a way I can ask R to execute the write(hello world,file=hello.txt) command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file with R CMD BATCH? Thank you Sebastien __

Re: [R] Listing of available functions

2011-01-04 Thread Sébastien Bihorel
Thank you David, Duncan, and Henrique. This is going to be useful. Sebastien On Tue, Jan 4, 2011 at 8:38 AM, David Winsemius dwinsem...@comcast.netwrote: You can also search for a cheatsheet. There are several out there searching on cheatsheet r This one at Oregon State is presented as a

Re: [R] Page eject and clearing the console

2011-01-04 Thread Greg Snow
Well the things most like cat('\n') for starting a new page would be cat('\013') or cat('\014') (vertical tab and form feed), however on all the terminals I tried they don't do anything since page is not a concept on a terminal. However if you outputted one of those into a file and interpreted

Re: [R] R command execution from shell

2011-01-04 Thread Duncan Murdoch
On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the write(hello world,file=hello.txt) command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file with R CMD BATCH? Yes. Some versions of R

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
You mentioned the boot package, I've just stumbled across a package called simpleboot, with a function lm.boot. Would this be suitable - it says I can sample cases from the origional dataset, as well as from the residuals of a model. Not all the options I understand but I assume the defaults

Re: [R] error in calling source(): invalid multibyte character in parser

2011-01-04 Thread Luca Meyer
It works fine, thanks. I was just wondering is there is anyway to include automatically the command you suggest as a default when I open R. Thanks, Luca Il giorno 03/gen/2011, alle ore 08.36, Phil Spector ha scritto: Luca - What happens why you type Sys.setlocale('LC_ALL','C')

Re: [R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Thank you That is exactly what I was looking for. Sebastien Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the write(hello world,file=hello.txt) command directly from the UNIX shell, instead of having to save this

Re: [R] error in calling source(): invalid multibyte character in parser

2011-01-04 Thread Prof Brian Ripley
On Tue, 4 Jan 2011, Luca Meyer wrote: How would I go by doing that? I have tried with: source(file.R, encoding=it_IT.UTF-8) But I get Error in file(file, r, encoding = encoding) : unsupported conversion from 'it_IT.UTF-8' to '' Well, that is not the value I suggested -- so what not simply

Re: [R] R command execution from shell

2011-01-04 Thread Prof Brian Ripley
On Tue, 4 Jan 2011, Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the write(hello world,file=hello.txt) command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file

[R] [R-pkgs] ENmisc_1.0

2011-01-04 Thread Erich Neuwirth
ENmisc contains two utility function mtapply is a hybrid of mapply and tapply. It evaluates summary function for each cell of data defined by a fixed set of factor values. The reason I wrote it was to be able to compute weighted means (using wtd.mean from Hmisc) to groups of data defined by

[R] [R-pkgs] Package animation update (v2.0-0)

2011-01-04 Thread Yihui Xie
Hi, The animation package 2.0-0 is on CRAN now. This version is a milestone of the animation package. It includes a new function saveHTML() which uses a much more elegant interface and is consistent in syntax with other save*() functions such as saveMovie(), saveSWF() and saveLatex(). Lots of

Re: [R] randomForest speed improvements

2011-01-04 Thread apresley
Andy, Thanks for the reply. I had no idea I could combine them back ... that actually will work pretty well. We can have several worker threads load up the RF's on different machines and/or cores, and then re-assemble them. RMPI might be an option down the road, but would be a bit of overhead

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Nevil Amos
Apologies, it is there! On 5/01/2011 1:26 AM, Sarah Goslee wrote: Hi Nevil, We really need an example here of what you're doing, since merge() does keep the id column by default. x- data.frame(id = c(a, b, c, NA), x=c(1,2,3,4)) y- data.frame(id1 = c(NA, a, d, c), y=c(101, 102, 103, 104))

  1   2   >