[R] Odp: Newb question re. read.table...

2010-03-03 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 03.03.2010 22:50:59: > I'm trying to get started with R, on Ubuntu. I worked through the > tutorial, and have made a small tab-delimited subset of my data to try > out (10 cases with about a dozens variables). But I can't seem to figure > out how to actu

Re: [R] Sub-setting a data frame by partial column names?

2010-03-03 Thread Sarah Henderson
Hi Jim, and thanks for your solution. I figured one out for myself about a minute after I posted this, and here it is if anyone else can find it valuable: subsetData<- bigData[,grep(partialName, colnames(bigData))] This is smaller than your solution, but similar I think. Cheers, Sarah On Thu

Re: [R] Sub-setting a data frame by partial column names?

2010-03-03 Thread Dieter Menne
Sarah Henderson wrote: > > > I think my Python brain is missing something crucial about string > operations in R, but I cannot figure this out. > > I have a large data frame with several groups of similar variables. > Similar variables are named according to their group, and I am now > writing

Re: [R] Sub-setting a data frame by partial column names?

2010-03-03 Thread Jim Lemon
On 03/04/2010 05:51 PM, Sarah Henderson wrote: Hi all -- I think my Python brain is missing something crucial about string operations in R, but I cannot figure this out. I have a large data frame with several groups of similar variables. Similar variables are named according to their group, and

[R] Sub-setting a data frame by partial column names?

2010-03-03 Thread Sarah Henderson
Hi all -- I think my Python brain is missing something crucial about string operations in R, but I cannot figure this out. I have a large data frame with several groups of similar variables. Similar variables are named according to their group, and I am now writing a function to check correlation

[R] logistic regression by group?

2010-03-03 Thread Noah Silverman
Hi, Looking for a function in R that can help me calculate a parameter that maximizes the likelihood over groups of observations. The general formula is: p = exp(xb) / sum(exp(xb)) So, according to the formulas I've seen published, to do this "by group" is product(p = exp(x_i * b_i) / sum(exp(

Re: [R] two questions for R beginners

2010-03-03 Thread kMan
John, I felt a short, somewhat strong reply was in order. One of the inherent aspects of the language is that R demands more of an understanding from users about what is taking place. Model formulae, for example, are close to what one would use if they were to write the model on paper. I consider

Re: [R] Setting graphical parameters

2010-03-03 Thread Rolf Turner
Do your own homework! It looks pretty trivial; what's your problem? cheers, Rolf Turner On 4/03/2010, at 2:39 PM, Pitmaster wrote: > > Hi guys... I have problem with this excersise... > > Consider the pressure data frame again. > > (a) Plot pressure against temper

[R] Setting graphical parameters

2010-03-03 Thread Pitmaster
Hi guys... I have problem with this excersise... Consider the pressure data frame again. (a) Plot pressure against temperature, and use the following command to pass a curve through these data: > curve((0.168 + 0.007*x)ˆ(20/3), from=0, to=400, add=TRUE) (b) Now, apply the power transformation

[R] Heatmap reordering of dendrogram to hierarchical clustering

2010-03-03 Thread Fearon Cassidy
Dear list members, I have been using R to create a heatmap where my data has continous variables from 0 to 100. When I create the heatmap, although the branches are correct, they do not order themselves so that the row with the most zeros is at one end and the row with the most 100s is at the othe

[R] Conditional Logistic Regression in R

2010-03-03 Thread Dimitrij Kudriavcev
Hello. I want to use conditional logistic regression to calculate the probability of winning one of three players in golf. I was able to calculate these probabilities in Stata10, and I now want to transfer the code in the R Project, because it is can get data directly form MySQL. Unfortunately, I'

Re: [R] extracting values conditonal on other values

2010-03-03 Thread Phil Spector
Toby - Thanks for the reproducible example! I think this will do what you want: both = merge(test1,test2) subset(both,time >= rise & time <= set) - Phil Spector Statistical Computing Facility

[R] extracting values conditonal on other values

2010-03-03 Thread Toby Gass
Dear R helpers, I have a dataframe (test1) containing the time of sunrise and sunset for each day of the year for 3 years. I have another dataframe (test2) containing measurements that are taken every 15 minutes, 24/7. I would like to extract all rows from test2 that occur between sunrise an

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Phil Spector
Albyn - That's a very important fact that I overlooked in my original response. Thanks for pointing it out. - Phil On Wed, 3 Mar 2010, Albyn Jones wrote: Note: this procedure assumes that all clusters have the same covariance matrix. alby

[R] Using discrete choice data to estimate marginal willingness to pay (MWTP)

2010-03-03 Thread Paul Miller
Hello Everyone,   Can anyone show me how to use discrete choice data to estimate marginal willingness to pay? I've searched for simple information or code on how to do this but haven't found much.   The closest I've come is a paper titled "Introduction to Choice Experiments using R." The paper s

Re: [R] counting the number of ones in a vector

2010-03-03 Thread Bert Gunter
x <- rep(c("A","B"),c(4,3)) table(x)['A'] Capiche? Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Randall Wrong Sent: Wednesday, March 03, 2010 3:03 PM To: Nutter, Benjamin; Henri

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

2010-03-03 Thread Duncan Murdoch
On 03/03/2010 5:25 PM, DarioAustralia wrote: Ah yes sorry about that it was a vague posting. What I'd like to see when I do a R CMD check on the package and it gets to the part where it runs the test script, I'd like to show to the user on the screen the progress of the testing. What happens now

[R] Arithmethic operations on timeSeries objects

2010-03-03 Thread Luis Felipe Parra
Hello I have a time series object which I created from the following code Fechas<-Datos[,1] dat<-Datos[,2:ncol(Datos)] datTS<-timeSeries(dat,Fechas) I am trying to do know basic arithmethic operations on it as the following datTS[3708,1]*2 Error en e1 * e2 : argumento no-numérico para operador bin

Re: [R] repeated measures anova, car package

2010-03-03 Thread Kay Cichini
sorry, it should say "I copied the model from the car manual.." more precise, I did the same as there in doing the lm(cbind()) call first an then the av.ok, etc. -- View this message in context: http://n4.nabble.com/repeated-measures-anova-car-package-tp1573721p1577432.html Sent from the R h

Re: [R] Zero inflated negative binomial

2010-03-03 Thread Achim Zeileis
On Thu, 4 Mar 2010, Rebecca Lawrence wrote: Hi all, I am running the following model: glm89.nb <- glm.nb(AvGUD ~ Year*Trt*Micro) where Year has 3 levels, Trt has 2 levels and Micro has 3 levels. However when I run it has a zero inflated negative binomial (as I have lots of zeros) I get the

Re: [R] R and screen (UNIX question)

2010-03-03 Thread Sarah Goslee
I've never had any trouble using R and screen with a remote connection. You're detaching it first, right? (Just to start with the obvious question.) What exactly are you doing, and what happens? Sarah On Wed, Mar 3, 2010 at 5:43 PM, Jonathan Greenberg wrote: > I'm having a mixed experience with

Re: [R] two questions for R beginners

2010-03-03 Thread Jim Lemon
On 03/04/2010 08:20 AM, David Winsemius wrote: ... Perhaps the print methods for data.frame and matrix should announce the class of the object being printed. Yes! An enthusiastic vote for highlighting this fundamental distinction. There is already quite enough conflation of these two very diss

Re: [R] counting the number of ones in a vector

2010-03-03 Thread Randall Wrong
Thanks to all of you ! (Benjamin Nutter, Henrique Dallazuanna, Tobias Verbeke, Jorge Ivan Velez, David Reinke and Gavin Simpson) x <- c(1, 1, 1, NA, NA, 2, 1, NA) > table(x)["1"] 1 4 Why do I get two numbers ? Thanks, Randall 2010/2/26 Nutter, Benjamin > But if x has any missing values: >

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Albyn Jones
Note: this procedure assumes that all clusters have the same covariance matrix. albyn On Wed, Mar 03, 2010 at 01:23:37PM -0800, Phil Spector wrote: > The manhattan distance and the Mahalanobis distances are quite different. > One of the main differences is that a covariance matrix is necessary

[R] empirical copula code

2010-03-03 Thread Roslina Zakaria
Hi all, I have this data set: ## Empirical copula ## dt1 = ranking ## dt2 = observed uniform data associated with the ranking   Sample data, > dt1     S_i   R_i  [1,]   7.0  10.0  [2,] 232.5 440.5  [3,] 143.0 141.5  [4,] 272.5 222.0  [5,]  46.0  34.0  [6,] 527.0 483.0  [7,] 420.5 563.5  [8,] 

[R] R and screen (UNIX question)

2010-03-03 Thread Jonathan Greenberg
I'm having a mixed experience with using R and UNIX's screen function -- sometimes when I close a connection that used screen, the R process is killed (which, in theory, it shouldn't be -- it should be running in the background). Does anyone have any ideas on how well (or not) R behaves with scree

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

2010-03-03 Thread DarioAustralia
Ah yes sorry about that it was a vague posting. What I'd like to see when I do a R CMD check on the package and it gets to the part where it runs the test script, I'd like to show to the user on the screen the progress of the testing. What happens now is none of the cat("Test X was successful. \n

Re: [R] Newb question re. read.table...

2010-03-03 Thread Rolf Turner
On 4/03/2010, at 10:50 AM, Steven DeRose wrote: > I'm trying to get started with R, on Ubuntu. I worked through the > tutorial, and have made a small tab-delimited subset of my data to try > out (10 cases with about a dozens variables). But I can't seem to figure > out how to actually refer to va

Re: [R] Newb question re. read.table...

2010-03-03 Thread Ista Zahn
Hi Steve, I think the problem is just that those variables are in the con data.frame. If so you have several options: 1) with(con, plot(rel, len)) 2) plot(con$rel, con$len) 3) attach(con); plot(rel, len) Best, Ista On Wed, Mar 3, 2010 at 4:50 PM, Steven DeRose wrote: > I'm trying to get starte

[R] Zero inflated negative binomial

2010-03-03 Thread Rebecca Lawrence
Hi all, I am running the following model: > glm89.nb <- glm.nb(AvGUD ~ Year*Trt*Micro) where Year has 3 levels, Trt has 2 levels and Micro has 3 levels. However when I run it has a zero inflated negative binomial (as I have lots of zeros) I get the below error message: > Zinb <- zeroinfl(AvGU

Re: [R] Working with combinations

2010-03-03 Thread Erich Neuwirth
The following code takes a combination of type n over k represented by an increasing sequence as input an produces the lexicographically next combinations. So you can single step through all possible combinations and apply your filter criteria before you produce the next combination. next.combi

[R] Newb question re. read.table...

2010-03-03 Thread Steven DeRose
I'm trying to get started with R, on Ubuntu. I worked through the tutorial, and have made a small tab-delimited subset of my data to try out (10 cases with about a dozens variables). But I can't seem to figure out how to actually refer to variables. I presume I'm missing something very simple, but

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Ravi Varadhan
"The manhattan distance and the Mahalanobis distances are quite different. " This ought to be a candidate for "fortunes". The way distances are perceived in New York city is very different from that in Calcutta (which is where Professor Prasant Chandra Mahalanobis lived)! Ravi.

Re: [R] Working with combinations

2010-03-03 Thread David Winsemius
On Mar 3, 2010, at 12:35 PM, Herm Walsh wrote: 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

Re: [R] two questions for R beginners

2010-03-03 Thread David Winsemius
On Mar 3, 2010, at 12:15 PM, William Dunlap wrote: 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 col

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Phil Spector
The manhattan distance and the Mahalanobis distances are quite different. One of the main differences is that a covariance matrix is necessary to calculate the Mahalanobis distance, so it's not easily accomodated by dist. There is a function in base R which does calculate the Mahalanobis dist

[R] Screen settings for point of view in lattice and misc3d

2010-03-03 Thread Waichler, Scott R
I'm making some 3D plots with contour3d from misc3d and wireframe from lattice. I want to view them from below; i.e. the negative z-axis. I can't figure out how to do so. I would like my point of view looking up from below, with the z, y, and x axes positive going away. Can anyone tell me th

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Tal Galili
I am sorry, After further inspection I fear my last answer was not correct, please ignore it - and let's wait for other responders. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Tal Galili
when you create the distance function to put into the hclust, use: dist(x, method = "manhattan") Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatisti

[R] cluster with mahalanobis distance

2010-03-03 Thread naama
How can I perform cluster analysis using the mahalanobis distance instead of the euclidean distance? thank you Naama Wolf -- View this message in context: http://n4.nabble.com/cluster-with-mahalanobis-distance-tp1577038p1577038.html Sent from the R help mailing list archive at Nabble.com. ___

[R] How to create a line and bar panel chart with two different axes?

2010-03-03 Thread DougNiu
I need to create a line and bar panel chart with two different axes. I tried in lattice but couldn't get it worked. Here is my code: data(barley) barchart(yield ~ variety | site, data = barley, groups = year, layout = c(1,6), stack = F, auto.key = list(points = FALSE,

Re: [R] Subset using partial values

2010-03-03 Thread David Winsemius
On Mar 3, 2010, at 9:04 AM, Newbie19_02 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 I200 1024 CAO0103166 20/06/1997 I209 1025 CAO0103166 25/02/

Re: [R] two questions for R beginners

2010-03-03 Thread John Sorkin
Bill, The points you make are well taken; one needs to know when to stop. I would suggest standardizing the methods used to refer to elements of a matrix and a dataframe and going no further. Why do I say this? A beginner, even a more experienced R users, probably envisions a dataframe and a ma

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

2010-03-03 Thread Henrique Dallazuanna
You can try this also: plot(m <- matrix(v, ncol = 2, byrow = TRUE)) polygon(m) On Wed, Mar 3, 2010 at 4:49 PM, sylvain willart wrote: > SOLVED, > > example from the "Nord-Pas-de-Calais" region: > > > v <- > c(237,55,236,58,229,57,214,57,203,55,197,54

Re: [R] Loop

2010-03-03 Thread Henrique Dallazuanna
You are using a random function to generate this values(runif). So, in each replication, the value is not equal. On Wed, Mar 3, 2010 at 4:50 PM, Val wrote: > Thank you  Henrique, > > However, > > F1<-sum(!findInterval(colMeans(replicate(100, z1(100, 4))), 0.2:0.3)) > F2<-sum(findInterval(colMean

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-0

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 wrote: > > 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 f

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. __ R-help@r-project

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] 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 <- seq

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 wrote: > Hi all, > > Assume the following function that generate a random number. > > z1<-function (n, eta) > { >        wv <- runif(n) >        wz <- (-1/eta) * log(wv) >        wz >

[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 2006-11

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

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: http://n4.nabble.com/filtering-signals-per-day-tp157704

[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

[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, Wildlife

[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.

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 really

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 m

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 i

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 m

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 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 package? and > > 2)

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 or

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 wrote: > > > On 03/03/10 09:26, Karl Ove Hufthammer wrote: >> >> On Tue, 2 Mar 2010 15:13:54 -05

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 operational

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 simul

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 > funct

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 su

[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: "alexia""roger","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=

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 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           I200 > 1024  

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] 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'

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 3/3/201

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] 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: http://n4.nabble.com/Matching-rows-in-a-Data-set-I-m-Stuck-tp1576432p157

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 I

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: http://n4.nabble.com/Matching-rows-in-

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 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

[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 ca

[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 e

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

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

2010-03-03 Thread Simon Urbanek
On Mar 3, 2010, at 7:45 , 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 I launch R from a terminal win

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 th

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). Fo

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] 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] 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 wrote: > > Hi, > > That was a good suggestion but I should have been more specific, >         PROCHI            Date_admission      main_condition >         CAO3121534     15/08/2006           I501 > 2

[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 th

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 1

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) 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 that hint.

Re: [R] two questions for R beginners

2010-03-03 Thread Petr PIKAL
"John Sorkin" 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 sight. mat<-matrix(1:12, 3

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 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     4110 > 1236

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] 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 someo

[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 a

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 contex

[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 2009-10-14

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

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] 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 1:(n-1)

  1   2   >