Re: [R] Three most useful R package

2010-03-03 Thread Karl Ove Hufthammer
On Tue, 2 Mar 2010 15:13:54 -0500 Ralf B ralf.bie...@gmail.com wrote: 1) What are your 3 most useful R package? and plyr ggplot2 lattice -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] turn character string into unevaluated R object

2010-03-03 Thread carol white
Thanks for all replies but it is still not what I wanted. Referring to the previous example that I gave, I want that the objects mat1, mat2 and mat3 be created as matrix object. I want to access their value without get() and when I type ls(), I will have mat1 mat2 mat3 and not only mat1

Re: [R] [SOLVED] file reading /problems with encoding

2010-03-03 Thread T . Wunder
After 1 day searching the internet, I solved the problem with the following code: Encode(xml) - UTF-8 # now the ü etc. become ü,etc. gsub(ü,Ä,xml) # employ the gsub()-function WITHOUT useBytes-option turned on Encode(xml) - unknwon # that was the former encoding So all in all there is a

Re: [R] turn character string into unevaluated R object

2010-03-03 Thread Barry Rowlingson
On Wed, Mar 3, 2010 at 8:26 AM, carol white wht_...@yahoo.com wrote: Thanks for all replies but it is still not what I wanted. Referring to the previous example that I gave, I want that the objects mat1, mat2 and mat3 be created as matrix object. I want to access their value without get()

Re: [R] Indexing zoo objects

2010-03-03 Thread Achim Zeileis
On Wed, 3 Mar 2010, Worik R wrote: I have a zoo object z z Value 2003-11-15 2.22 2003-11-17 2.26 2003-11-19 2.28 2003-11-22 2.54 2003-11-26 2.55 I wish to find the entry 2 entries before 2003-11-26. How do I do this? If you want to find out that this is at the third position

[R] R times series

2010-03-03 Thread Beaudelaire TAFOUEDA
Hello ! Please let me ask how can somebody manipulate de (G)ARCH times series processus in R. Tank ! -- View this message in context: http://n4.nabble.com/R-times-series-tp1576119p1576119.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] nu-SVM crashes in e1071

2010-03-03 Thread LWF
(...) While you're sending your bug report to David, perhaps you can try the SVM from kernlab. It relies on code from libsvm, too, but ... you never know. It can't hurt to try. Hi Steve, thanks for that hint. I tried ksvm()-function bet get an error message: model - ksvm(soil_unit~.,

Re: [R] R times series

2010-03-03 Thread Achim Zeileis
On Tue, 2 Mar 2010, Beaudelaire TAFOUEDA wrote: Hello ! Please let me ask how can somebody manipulate de (G)ARCH times series processus in R. Tank ! See the GARCH section in: http://CRAN.R-project.org/view=TimeSeries hth, Z -- View this message in context:

Re: [R] Three most useful R package

2010-03-03 Thread Philippe Grosjean
On 03/03/10 09:26, Karl Ove Hufthammer wrote: On Tue, 2 Mar 2010 15:13:54 -0500 Ralf Bralf.bie...@gmail.com wrote: 1) What are your 3 most useful R package? and plyr ggplot2 lattice Well, as you ask the question, the three most useful R packages are: base, stats and methods ;-) ...

Re: [R] Three most useful R package

2010-03-03 Thread Karl Ove Hufthammer
On Wed, 3 Mar 2010 09:26:32 +0100 Karl Ove Hufthammer k...@huftis.org wrote: 1) What are your 3 most useful R package? and plyr ggplot2 lattice And since 'lattice' already is in the 'recommended' set, and therefore included in R by default, I'd like to add one more package: sos --

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Prof Brian Ripley
You haven't mentioned an OS nor a graphics device, So I will guess Windows and windows(), since that is commonest device with a history. On Wed, 3 Mar 2010, Tal Galili wrote: Hello dear R-help members, Very soon I am to give a lecture on R. And in that lecture I intend to move between:

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
Thanks for replying Brian. Indeed, I am working on windows (XP). I tried doing: dev.new(record = T) And got: Warning message: ‘mode(record)’ differs between new and previous == NOT changing ‘record’ But if I understood you, I could open a window with a plot, then open a new one (with

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Prof Brian Ripley
On Wed, 3 Mar 2010, Tal Galili wrote: Thanks for replying Brian. Indeed, I am working on windows (XP). I tried doing: dev.new(record = T) And got: Warning message: ‘mode(record)’ differs between new and previous          == NOT changing ‘record’  But if I understood you, I could open a window

Re: [R] Three most useful R package

2010-03-03 Thread Graham Smith
1) What are your 3 most useful R package? On the assumption that we mean those packages that add some generic functionality, then plyr ggplot2 Car and Hmisc (i know that is four) So similar to others peoples list I have others that are always first to be installed, but specific to my

Re: [R] Three most useful R package

2010-03-03 Thread Michael Denslow
Hi Ralf, 1) What are your 3 most useful R package? Its hard to pick three but since you are making me... vegan rgdal (which will also get you sp, another favorite) rms Michael -- Michael Denslow I.W. Carpenter Jr. Herbarium [BOON] Department of Biology Appalachian State University Boone,

Re: [R] Indexing zoo objects

2010-03-03 Thread Gabor Grothendieck
I would normally use 'which', as already suggested, but if, as in your example, the 26th were the last in the series and this is known then these would all work too to get the time of the 3rd last (2nd prior to the last): time(z)[length(z) - 2] time(tail(z, 3)[1, ]) head(tail(time(z), 3), 1)

Re: [R] two questions for R beginners

2010-03-03 Thread Patrick Burns
I think Duncan's example of a list that is a matrix is a compelling argument not to do the change. A matrix that is a list with both names and dimnames *is* probably rare (but certainly imaginable). A matrix that is a list is not so rare, and the proposed double meaning of '$' would certainly

Re: [R] how to import map data (maptools?) from a html set of 'coords'

2010-03-03 Thread Michael Denslow
Hi Sylvian, On Tue, Mar 2, 2010 at 1:15 PM, sylvain willart sylvain.will...@gmail.com wrote: Dear R users, I would like to draw map and import it in maptools/spatstat packages. The 'raw data' I have come from a web page (map.../map) and are basically a list of coordinates of a polygon. I

Re: [R] Three most useful R package

2010-03-03 Thread baptiste auguie
Hi, The 3 packages I load most often are my own; typically I make a new package for every new job. It automatically loads other packages as dependencies (top-ranked are ggplot2, reshape, plyr) as well as my data and functions I'm currently working with. If some functions evolve further towards a

[R] Finding a date 6 months before

2010-03-03 Thread Sergey Goriatchev
Hello everyone I use zoo objects and I need to find a date 6 months before today's date. Example, today we have 3rd March 2010, I need to find the date 3rd September 2009. How could I do that, please? Regards, Sergey -- Simplicity is the last step of art./Bruce Lee The more you know, the

Re: [R] Finding a date 6 months before

2010-03-03 Thread Gabor Grothendieck
Try this. as.Date(as.yearmon(today) - 6/12) gives the 1st of the month 6 months ago and the remainder of that line moves ahead by d-1 days if its the d-th day of the month now. library(zoo) z - zoo(0:399, as.Date(2009-06-01)+0:399) today - Sys.Date(); today [1] 2010-03-03 ago6mos -

[R] List of zoo dataframes

2010-03-03 Thread Research
Hello, I have various datasets of zoo time series (merged into single frames via the merge command) such as datevar0var1var2var3 08/07/1996 652.54 0.2239220.5158190.502638 08/08/1996 662.59 0.9978410.0003830.999806 06/09/1996

[R] R help unavailable

2010-03-03 Thread mauede
I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully but right now I realized that the on-line help does not work any more. When I type ?R-command a message pops up warning that Help will not be available. Path not found ... regardless of

Re: [R] List of zoo dataframes

2010-03-03 Thread Achim Zeileis
On Wed, 3 Mar 2010, Research wrote: Hello, I have various datasets of zoo time series (merged into single frames via the merge command) such as datevar0var1var2var3 08/07/1996 652.54 0.2239220.5158190.502638 08/08/1996 662.59 0.997841

Re: [R] Trouble With for() Loops

2010-03-03 Thread Duncan Murdoch
On 03/03/2010 2:27 AM, Milo Phillips-Brown wrote: Hello, I'm trying to learn R (for fun!), and I've tried to find any previous discussion of this problem (or something like it) and haven't found one. When I run the following command, R seems to simply stop. I get no error message, but I

Re: [R] R help unavailable

2010-03-03 Thread Duncan Murdoch
On 03/03/2010 6:39 AM, mau...@alice.it wrote: I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully but right now I realized that the on-line help does not work any more. When I type ?R-command a message pops up warning that Help will not be

Re: [R] data.table evaluating columns

2010-03-03 Thread Matthew Dowle
I'd go a bit further and remind that the r-help posting guide is clear : For questions about functions in standard packages distributed with R (see the FAQ Add-on packages in R), ask questions on R-help. If the question relates to a contributed package , e.g., one downloaded from CRAN, try

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
Thanks Brian, I wrote a tiny script employing your answer. resize.win - function(Width=6, Height=6) { # works for windows dev.off(); # dev.new(width=6, height=6) windows(record=TRUE, width=Width, height=Height) } resize.win(5,5) plot(rnorm(100)) resize.win(10,10) plot(rnorm(100))

Re: [R] : Three most useful R package

2010-03-03 Thread Frank Bloos
ad 1) ggplot2, Hmisc, RODBC ad 2) A package to produce high quality tables with summary statistics for publications in scientific journals. Regards, Frank Ralf B ralf.bie...@gmail.com 02.03.2010 21:13 Hi R-fans, I would like put out a question to all R users on this list and hope it will

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
BTW, If someone is willing to help with two questions - we can extend the small code I just wrote to other OS's. It might be useful for future people who will present R graphical outputs to an audience. The questions are: 1) What is the equivalent of the command windows to other OS ? 2) How can

Re: [R] Correct nested design for GLM

2010-03-03 Thread Walmes Zeviani
I guess your model specification is incoherent. It's seems to me that you incorporated some kind of lmer() style with (0 + Micro/Trt/Year) term. Consider the toy data and code below. Nesting model is m2. Models m1 and m3 are the same so showing that terms in brackets don't are used. da -

[R] R: R help unavailable

2010-03-03 Thread mauede
Actually the problem exists only if I use JGR. If I launch R from a terminal window then the text on-line help works. It used to work with JGR too but with R version 2.9.0. Now, JGR shows the new R version is running but the on-line help is no more available from JGR. Perhaps JGR implementors

Re: [R] Finding a date 6 months before

2010-03-03 Thread Sergey Goriatchev
Dear Gabor, Fantastic! Thank you very much for your help, as always! Regards, Sergey On Wed, Mar 3, 2010 at 12:24, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try this.  as.Date(as.yearmon(today) - 6/12) gives the 1st of the month 6 months ago and the remainder of that line moves ahead

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Prof Brian Ripley
On Wed, 3 Mar 2010, Tal Galili wrote: BTW,If someone is willing to help with two questions - we can extend the small code I just wrote to other OS's. It might be useful for future people who will present R graphical outputs to an audience. But none of the other standard devices supports

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread BioStudent
I have not explained this properly. I meant to say if the ID vales of the rows in each file match, print the data into a new dataframe with this structure ID DATA1 2345 VALUE1 VALUE2 where value1 is from the first dataset and value2 is from the 2nd -- View this message in context:

[R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread BioStudent
Hi, I'm having (yet another) problem with R. I have a few data sets that have this sort of format dataset1 ID DATA 1234 value 2345 value 3456 value dataset2 ID DATA value 2345 value value What i really want to do is write an R script that says if the ID of dataset1 and 2 match

Re: [R] Three most useful R package

2010-03-03 Thread Tony B
I only really need the base packages, but otherwise I suppose the most useful for me are: (1) RCurl (2) plyr (3) XML On 2 Mar, 20:13, Ralf B ralf.bie...@gmail.com wrote: Hi R-fans, I would like put out a question to all R users on this list and hope it will create some feedback and

Re: [R] data.table evaluating columns

2010-03-03 Thread Rob Forler
Okay I appreciate the help, and I appreciate the FAQ reminder. I will read the r-help posting guide. I'm relatively new to using the support systems around R. So far everyone has been really helpful. I'm confused as to which data.table list I should be using.

[R] error in R

2010-03-03 Thread frederik vanhaelst
Hi, I want put some values in the last column of a matrix b. But every time again there comes the same error on the screen... b - array(0, c(5,5)) m-matrix(runif(20,0,2*pi),5) # the sinus of this kind of values i want put in the last column of b, m is a 5*4 matrix n-5 for(i in 1:n){

Re: [R] Three most useful R package

2010-03-03 Thread Rob Forler
RODBC data.table On Wed, Mar 3, 2010 at 3:29 AM, Tony B tony.bre...@googlemail.com wrote: I only really need the base packages, but otherwise I suppose the most useful for me are: (1) RCurl (2) plyr (3) XML On 2 Mar, 20:13, Ralf B ralf.bie...@gmail.com wrote: Hi R-fans, I would

Re: [R] : Three most useful R package

2010-03-03 Thread Karl Ove Hufthammer
On Wed, 03 Mar 2010 13:09:09 +0100 Frank Bloos frank.bl...@med.uni- jena.de wrote: ad 2) A package to produce high quality tables with summary statistics for publications in scientific journals. Doesn't Hmisc do that (the 'latex' function)? See

Re: [R] Three most useful R package

2010-03-03 Thread Rob Forler
Sorry to clear up the reasons why: RODBC because it allows me to seamlessly interact with all the databases at the place I work. And data.table because it does aggregation about 50x times faster than plyr (which I used to use a lot). Thanks, Rob On Wed, Mar 3, 2010 at 7:07 AM, Rob Forler

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread Liviu Andronic
On 3/3/10, BioStudent s0975...@sms.ed.ac.uk wrote: What i really want to do is write an R script that says if the ID of dataset1 and 2 match (2nd row), print out that whole row into a new dataset3. Would this do what you want? x1 - iris[1:5,] x1 Sepal.Length Sepal.Width Petal.Length

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread Marc Schwartz
On Mar 3, 2010, at 5:52 AM, BioStudent wrote: Hi, I'm having (yet another) problem with R. I have a few data sets that have this sort of format dataset1 ID DATA 1234 value 2345 value 3456 value dataset2 ID DATA value 2345 value value What i really want to do is

Re: [R] how to import map data (maptools?) from a html set of 'coords'

2010-03-03 Thread sylvain willart
Hi thanks for your reply, I'll try to better explain my request... the data do not come from a file with a specific extension, this is just some lines I copied pasted from a source html file The web page is: http://www.insee.fr/fr/ppp/bases-de-donnees/donnees-detaillees/duicq/accueil.asp it

Re: [R] error in R

2010-03-03 Thread Paul Hiemstra
Hi Frederik, There is no need for the double for loop: b[,5] - sin(runif(5,0,2*pi)) As to your question, check the values i and k take. In the first iteration of the second loop k == 0, and R does not support an index equal to 0. The problem is in 1:n-1, this gives 0- 4, in stead do

Re: [R] Three most useful R package

2010-03-03 Thread Corey Sparks
3 most used packages: 1)spdep (for spatial regression/statistics) 2)car 3)survival (which is recommended, so) 3.5) survey (for analysis of complex survey samples) Best to all, Corey - Corey Sparks, PhD Assistant Professor Department of Demography and Organization Studies University of Texas

Re: [R] sem package and growth curves

2010-03-03 Thread Chuck Cleland
On 3/2/2010 1:43 AM, Daniel Nordlund wrote: I have been working through the book Applied longitudinal data analysis: modeling change and event occurrence by Judith D. Singer and John B. Willett. I have been working examples using SAS and also using it as an opportunity for learning to use

[R] Creating a timeSeries Object

2010-03-03 Thread Luis Felipe Parra
Hello I have 2000 univariate timeSeries of about 20 observations each, as the following, I would like to store all of them in one object, sort of a data frame or something similar. Do you know how can I do this. Thank you Felipe Parra GMT 2009-10-12 2009-10-12 0.002346171

Re: [R] Three most useful R package

2010-03-03 Thread Dieter Menne
Rob Forler wrote: And data.table because it does aggregation about 50x times faster than plyr (which I used to use a lot). This is correct, from the error message its spits out one has to conclude that is was abandoned at R-version 2.4.x Dieter -- View this message in context:

[R] Subset using partial values

2010-03-03 Thread Newbie19_02
Hi everyone, I would like to subset a data.frame using partial values. For example I have the following data.frame: PROCHI Main_condition 1234 411 1235 4110 1236 4111 1237 I20 1238I201 1239I202 Now let's say that I use the Subset function. Ordinarily I would use it

Re: [R] Output from test script during R CMD check

2010-03-03 Thread Dieter Menne
DarioAustralia wrote: In the .R file I put in the tests directory, I have a number of cat(My text here) type statements, that explain when a certain test completed successfully but everything I tried so far (like putting sink(NULL) at the top of the .R file) hasn't worked. Does someone

Re: [R] data.table evaluating columns

2010-03-03 Thread Matthew Dowle
That in itself is a question for the maintainer, off r-help. When the posting guide says contact the package maintainer first it means it literally and applies even to questions about the existence of a mailing list for the package. So what I'm supposed to do now is tell you how the posting

Re: [R] Subset using partial values

2010-03-03 Thread Henrique Dallazuanna
Try this: subset(x, grepl('411', Main_condition)) On Wed, Mar 3, 2010 at 11:33 AM, Newbie19_02 nvanzuy...@gmail.com wrote: Hi everyone, I would like to subset a data.frame using partial values. For example I have the following data.frame: PROCHI  Main_condition 1234      411 1235    

Re: [R] two questions for R beginners

2010-03-03 Thread Petr PIKAL
John Sorkin jsor...@grecc.umaryland.edu napsal dne 01.03.2010 15:19:10: If it looks like a duck and quacks like a duck, it ought to behave like a duck. To the user a matrix and a dataframe look alike . . . except a dataframe can Well, matrix looks like a data.frame only on the first

Re: [R] nu-SVM crashes in e1071

2010-03-03 Thread Steve Lianoglou
Hi, On Wed, Mar 3, 2010 at 4:08 AM, Häring, Tim (LWF) tim.haer...@lwf.bayern.de wrote: (...) While you're sending your bug report to David, perhaps you can try the SVM from kernlab. It relies on code from libsvm, too, but ... you never know. It can't hurt to try. Hi Steve, thanks for

[R] ANOVA questions

2010-03-03 Thread Amit Patel
I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using

Re: [R] Subset using partial values

2010-03-03 Thread Newbie19_02
Hi, That was a good suggestion but I should have been more specific, PROCHIDate_admission main_condition CAO3121534 15/08/2006 I501 28394 CAO3121534 18/04/1999 I251 28395 CAO3121534 18/10/1993 4109 28396 CAO3121534

Re: [R] Subset using partial values

2010-03-03 Thread Henrique Dallazuanna
Then: subset(x, grepl('410|I25', main_condition)) On Wed, Mar 3, 2010 at 11:59 AM, Newbie19_02 nvanzuy...@gmail.com wrote: Hi, That was a good suggestion but I should have been more specific,         PROCHI            Date_admission      main_condition         CAO3121534     15/08/2006    

Re: [R] Subset using partial values

2010-03-03 Thread Newbie19_02
Thanks again for the help but what I am having trouble with is that I get: 1012 CAO0103166 01/04/1999 I200 1016 CAO0103166 03/05/2000 I200 1024 CAO0103166 20/06/1997 I209 1025 CAO0103166 25/02/1999 I209 1027 CAO0103166 27/08/1999

Re: [R] Three most useful R package

2010-03-03 Thread ivan popivanov
1) quantmod, zoo, xts, TTR in no particular order, the first requires the others, so I can't really separate them. 2) There are plenty of packages for my needs (using R as a hobbyist), but my biggest concern is that they lack active support. A package for complex testing of trading strategies

Re: [R] sem package and growth curves

2010-03-03 Thread John Fox
Dear Chuck and Daniel, First, thanks Chuck for fielding the question, which I didn't notice in r-help. I can get solutions for models A, B, and C using the automatic start values along with the argument par.size=startvalues to sem() (as recommended in ?sem if there are convergence problems). For

Re: [R] two questions for R beginners

2010-03-03 Thread John Sorkin
Petr, On the other hand . . . mat-matrix(1:12, 3,4) dat-as.data.frame(mat) mat [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 dat V1 V2 V3 V4 1 1 4 7 10 2 2 5 8 11 3 3 6 9 12 What you are demonstrating by your example is the

Re: [R] [stats-rosuda-devel] R: R help unavailable

2010-03-03 Thread Simon Urbanek
On Mar 3, 2010, at 7:45 , mau...@alice.it mau...@alice.it wrote: Actually the problem exists only if I use JGR. Make sure you upgrade JGR. You need JGR 1.7 or higher to work with R 2.10. If you have any questions, please use the JGR mailing list stats- rosuda-devel. Thanks, Simon If

Re: [R] two questions for R beginners

2010-03-03 Thread Petr PIKAL
Hi that is why I consider matrix is just a vector with dimensions and data.frame is a rectangular structure similar to Excel table. That saved me a lot of surprises. But I must admit I am not a real beginner nowadays although I still learn when using R, reading help list and trying sometimes

[R] Odp: Trouble With for() Loops

2010-03-03 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 03.03.2010 08:27:27: Hello, I'm trying to learn R (for fun!), and I've tried to find any previous discussion of this problem (or something like it) and haven't found one. When I run the following command, R seems to simply stop. I get no error

[R] help R IRT simulation

2010-03-03 Thread Helen Lisman
hello R, This is about simulation in psychomtrics in IRT in R. I want to simulate b parameters(item difficulty) with moments of fixed values of mean, st.d, skewness and kurtosis. Is there any specific IRT package in R with those functions to control those moments? I have seen other programs that

Re: [R] Three most useful R package

2010-03-03 Thread kulwinder banipal
other than base : 1. XML Rcurl2. lattice3. Hmisc On Tue, Mar 2, 2010 at 10:13 PM, Ralf B ralf.bie...@gmail.com wrote: Hi R-fans, I would like put out a question to all R users on this list and hope it will create some feedback and discussion. 1) What are

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread Albart
Hi, are your dataframes really called file1 and file2? Then, it will be something like this: test Links: -- [1] http://n4.nabble.com/Matching-rows-in-a-Data-set-I-m-Stuck-tp1576432p1576523.html [2] (link removed) = -- View this message in context:

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread BioStudent
Unfortunately its complaining that 'by.x' and 'by.y' specify different numbers of columns'. I don't really see why that matters if your matching tbh... I'm having a few problems. Merge is definitely what I want but my files are way too big and i'm having memory trouble. Plus I figures out the

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread BioStudent
Thanks! I'm just trying to do it now but having issues with memory... test - merge(file1, file2, by.x = col1) will this give me the output I was hoping for ID VALUE1 VALUE2 ? Thanks -- View this message in context:

Re: [R] Odp: Loop overwrite and data output problems

2010-03-03 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 01.03.2010 16:36:27: Hi Petr, Thanks again for trying again with these data, I really appreciate it. Your script works perfectly, but the problem I'm having is how to store the model results so after your script I would do:

Re: [R] Three most useful R package

2010-03-03 Thread Cedrick W. Johnson
I think Brian and Josh the two powerhouses behind quantmod and other finance related packages are working on a package called 'blotter' which is on r-forge which may be able to help you with keeping track and doing some testing of trading strategies. regards, cj On

Re: [R] Matching rows in a Data set? I'm Stuck!!

2010-03-03 Thread Marc Schwartz
On Mar 3, 2010, at 7:24 AM, BioStudent wrote: Thanks! I'm just trying to do it now but having issues with memory... test - merge(file1, file2, by.x = col1) will this give me the output I was hoping for ID VALUE1 VALUE2 ? Thanks If you are going to use 'by.x' then you also

Re: [R] sem package and growth curves

2010-03-03 Thread Chuck Cleland
Dear John, Thanks very much for your message. I should have looked at the help page for sem() more closely. Thanks again for your excellent work on the package. Regards, Chuck On 3/3/2010 10:18 AM, John Fox wrote: Dear Chuck and Daniel, First, thanks Chuck for fielding the question,

Re: [R] Subset using partial values

2010-03-03 Thread Henrique Dallazuanna
What is your entire dataset and the code used to do this? On Wed, Mar 3, 2010 at 12:04 PM, Newbie19_02 nvanzuy...@gmail.com wrote: Thanks again for the help but what I am having trouble with is that I get: 1012  CAO0103166     01/04/1999           I200 1016  CAO0103166     03/05/2000        

[R] Issue with length limit in write.table

2010-03-03 Thread alexia
Hi, I have an issue with the write.table command: I have a dataset, with many rows and 3 columns. I give a row example: alexiaroger,delphine roger,bruno,sandra I fist process the data to be able to process the column entries as vectors: mo-readLines(c:\\data.txt,n=-1)

Re: [R] somebody help me about this error message...

2010-03-03 Thread Greg Snow
Others answered your question. I would however suggest that you asked the wrong question. If you really feel the need for your future self to serve some serious penance for past or near future misdeeds, then continuing with this strategy is one way to do that (just please don't inflict your

Re: [R] help R IRT simulation

2010-03-03 Thread Stuart Luppescu
On Wed, 2010-03-03 at 09:45 -0600, Helen Lisman wrote: hello R, This is about simulation in psychomtrics in IRT in R. I want to simulate b parameters(item difficulty) with moments of fixed values of mean, st.d, skewness and kurtosis. Is there any specific IRT package in R with those functions

Re: [R] help R IRT simulation

2010-03-03 Thread Dimitris Rizopoulos
to simulate from IRT models have a look at function rmvlogis() from package ltm. I hope it helps. Best, Dimitris On 3/3/2010 6:05 PM, Stuart Luppescu wrote: On Wed, 2010-03-03 at 09:45 -0600, Helen Lisman wrote: hello R, This is about simulation in psychomtrics in IRT in R. I want to

Re: [R] help R IRT simulation

2010-03-03 Thread Doran, Harold
The simRasch function in MiscPsycho package simulates person abilities using N(mu, sigma^2) and items from U(-x,x), which is not what you're asking for. But, I also am not sure how you would manipulate the other moments. However, item parameters tend not to be normally distributed in

Re: [R] Three most useful R package

2010-03-03 Thread Ralf B
Correct. Ralf --- Ralf Bierig Post-Doctoral Associate School of Communication and Information Rutgers University New Brunswick, NJ 08901-1071, USA On Wed, Mar 3, 2010 at 4:16 AM, Philippe Grosjean phgrosj...@sciviews.org wrote: On 03/03/10 09:26, Karl Ove Hufthammer wrote: On Tue, 2 Mar

Re: [R] sem package and growth curves

2010-03-03 Thread Daniel Nordlund
Chuck and John, Thank you both for your help. I figured that my problem was trying to work through a new area for me, and trying to learn a new package for that area at the same time. You have both provided examples that clarified things that I either didn't understand about SEM in general

Re: [R] Three most useful R package

2010-03-03 Thread Juliet Hannah
I use rms, lme4, ggplot2 frequently (also lattice and MASS). On Tue, Mar 2, 2010 at 3:13 PM, Ralf B ralf.bie...@gmail.com wrote: Hi R-fans, I would like put out a question to all R users on this list and hope it will create some feedback and discussion. 1) What are your 3 most useful R

Re: [R] Three most useful R package

2010-03-03 Thread Matthew Dowle
Dieter, One way to check if a package is active, is by looking on r-forge. If you are referring to data.table you would have found it is actually very active at the moment and is far from abandoned. What you may be referring to is a warning, not an error, with v1.2 on R2.10+. That was fixed

Re: [R] R beginner

2010-03-03 Thread Dieter Menne
azman wrote: i'am is new in R software.i have try to make a function but it can't give what it should.i dunno what have to do next. Can somebody help me to solve it.i'll very appreciate... Your example is nice, because it is self-contained (even if there is a buglet). When I run it, I

Re: [R] two questions for R beginners

2010-03-03 Thread William Dunlap
If R made matrix$columnName mean the same as matrix[, columnName] (a vector) so matrices looked more like data.frames, would we also want the following to work as they do with data.frames? with(matrix, log(columnName)) # log of that column as a vector matrix[columnName] # 1-column

Re: [R] Three most useful R package

2010-03-03 Thread Greg Snow
I find myself loading the TeachingDemos package most often, though in my case there may be one of those chicken/egg things going on. I also use MASS and rms quite a bit (if we are limited to 3, but I also use survival, Hmisc, and splines, but they are loaded with rms). The package that I

[R] Loop

2010-03-03 Thread Val
Hi all, Assume the following function that generate a random number. z1-function (n, eta) { wv - runif(n) wz - (-1/eta) * log(wv) wz } y - z1(100,4) mean(y) I want to run this function say 1000 times and I want to count if the mean(y) outside the following range 0.20

[R] How to calculate Eigen values from LDA object

2010-03-03 Thread Robert Lonsinger
Can anybody explain to me how to calculate Eigen values for linear discriminants, which have been identified in the scaling matrix of a LDA analysis [lda()]. cheers ~~ Robert Lonsinger Wildlife Grad. Research Assistant New Mexico State University Dept. of Fish,

[R] End of line marker?

2010-03-03 Thread jonas garcia
Dear R users, I am trying to read a huge file in R. For some reason, only a part of the file is read. When I further investigated, I found that in one of my non-numeric columns, there is one odd character responsible for this, which I reproduce bellow:  In case you cannot see it, it looks like a

Re: [R] filtering signals per day

2010-03-03 Thread anna
May doing a cumsum restricted on each date could help, I remember I read someone doing this on a post...because once i do this i will be able to discriminate the numbers different from 1. - Anna Lippel -- View this message in context:

Re: [R] Working with combinations

2010-03-03 Thread Herm Walsh
Thanks David for the thoughts.  The challenge I have with this approach is that the criteria I have is defined by a series of tests--which I do not think I could substitute in in place of the logical indexing. In the combinations code I was hoping there is a step where, each new combination is

[R] filtering signals per day

2010-03-03 Thread anna
Hello R lovers, I have a vector of dates and signals. I want to filter the signals per day in a way that only the first signal of the day remains like this: Dates Signals Filtered Signal 2006-11-02 00 2006-11-02 11

Re: [R] Loop

2010-03-03 Thread Henrique Dallazuanna
Try this: sum(!findInterval(colMeans(replicate(1000, z1(100, 4))), 0.2:0.3)) On Wed, Mar 3, 2010 at 4:15 PM, Val valkr...@gmail.com wrote: Hi all, Assume the following function that generate a random number. z1-function (n, eta) {        wv - runif(n)        wz - (-1/eta) * log(wv)      

Re: [R] how to import map data (maptools?) from a html set of 'coords'

2010-03-03 Thread sylvain willart
SOLVED, example from the Nord-Pas-de-Calais region: v - c(237,55,236,58,229,57,214,57,203,55,197,54,187,48,179,46,179,35,180,31,184,26,197,23,201,24,202,31,207,34,213,31,216,37,219,41,228,46,234,47,237,55) seqx - seq(1,length(v),by=2) seqy -

Re: [R] Loop

2010-03-03 Thread Val
Thank you Henrique, However, F1-sum(!findInterval(colMeans(replicate(100, z1(100, 4))), 0.2:0.3)) F2-sum(findInterval(colMeans(replicate(100, z1(100, 4))), 0.2:0.3)) the sum of the two (F1+F2) = number of replicates (in this case 100). Sometimes I do not get that sum. Do you know why? Val

Re: [R] filtering signals per day

2010-03-03 Thread anna
ifelse(ave(signals, dates , FUN=cumsum) = 1, 1, 0) - Anna Lippel -- View this message in context: http://n4.nabble.com/filtering-signals-per-day-tp1577044p1577102.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] filtering signals per day

2010-03-03 Thread Henrique Dallazuanna
Try this: f$Filtered - unlist(sapply(unstack(f, Signals ~ Dates), function(.x)tabulate(which(as.logical(.x))[1], length(.x On Wed, Mar 3, 2010 at 4:20 PM, anna lippelann...@hotmail.com wrote: Hello R lovers, I have a vector of dates and signals. I want to filter the signals per day in a

Re: [R] filtering signals per day

2010-03-03 Thread Peter Alspach
Tena koe Anna The following appears to do what you want (anna is a dataframe containing the data you provided): anna$Test - anna$Signals anna[duplicated(paste(anna$Dates, anna$Signals)),'Test'] - 0 anna Dates Signals Filtered.Signal Test 1 02-11-06 0 00 2 02-11-06

  1   2   >