[R] Mysterious Eclipse / StatET error messages

2011-10-12 Thread Al Roark
All, I'm not sure when this started, but I've noticed that just about any time I add to an R script in Eclipse, I get a warning in Eclipse's error log that looks like the following: Unhandled/Unknown code of R AST node: Code: 0x100 Node: <- (195, 70) Line 4 at offset 195 (can be wro

Re: [R] monotonic factors

2011-10-12 Thread Greg Snow
One approach would be to code dummy variables for your factor levels, have d1 equal to 0 for 'low' and 1 for 'med' and 'high', then have d2 equal to 1 for 'high' and 0 otherwise. For linear regression there are functions that will fit a model with all non-negative coefficients, but I don't know

Re: [R] Chi-Square test and survey results

2011-10-12 Thread Greg Snow
The chisq.test function is expecting a contingency table, basically one column should have the count of respondents and the other column should have the count of non-respondents (yours looks like it is the total instead of the non-respondents), so your data is wrong to begin with. A significant

Re: [R] large numbers

2011-10-12 Thread David Winsemius
On Oct 12, 2011, at 3:16 PM, Veerappa Chetty wrote: Hi, When I import an excel "CSV" file, large numbers such as " 43988014.3" is imported as "43988014", leaving out the decimal ".4". How to import keeping the fraction? "Import from Excel" is a vague problem statement. It's also kind of

Re: [R] Applying function to only numeric variable (plyr package?)

2011-10-12 Thread Dennis Murphy
Hi: One approach to this problem in plyr is to use the recently developed mutate() function rather than ddply(). mutate() is a somewhat faster version of transform(); when used as a standalone function, it doesn't take a grouping variable as an argument. For this example, one could use mutate(df,

Re: [R] R and Forex

2011-10-12 Thread David Winsemius
On Oct 12, 2011, at 10:40 AM, Yves S. Garret wrote: When can I send stuff to the mailing list without having moderator approval? Is that possible? If you register (and you are currently registered at that address ) you can generally avoid moderation. The view available to the moderators

[R] dcc in 'bootRes' package

2011-10-12 Thread Xanthe Walker
Hello, I am trying to complete a response function analysis using the command dcc in the package 'bootRes'. Here is my code: DC<-read.table("Dalton.txt", header=T) climate<-read.table("climate.txt", header=T) dcc.DC<-dcc(DC, climate, method ="response", start = -4, end =9) My data is formatted c

Re: [R] R and Forex

2011-10-12 Thread R. Michael Weylandt
Just a comment on the lack of a direct R API for non-IBrokers brokerages: of course its possible to put something together using rJava or a direct C interface, but it's not the smoothest thing if you've never delved into the R internals and it's not quite the fastest thing in the world if you are d

Re: [R] how to calculate the statistics of a yearly window with a rolling step as 1 day?

2011-10-12 Thread Gabor Grothendieck
On Wed, Oct 12, 2011 at 9:12 AM, ecoc wrote: > This doesn't work becaues the rollappy is non-overlapping. My rolling step is > 1-day and rolling window is 1-year, so there is 364 days overlapping. > Its not the case that rollapply is non-overlapping. rollapply by default calls the function on a

[R] getting data associated with coordinates in a spatial data frame

2011-10-12 Thread Bailey, Daniel
If I know the specific coordinate in a spatial data frame, how can I access the data at that coordinate? My coordinates are labeled "x" and "y" in a data.frame "e". The data is in column "leachate". I want to say, basically: e$leachate@coordinates(2,3). Thanks

[R] How to transfer the variable into function in this code?

2011-10-12 Thread xingxing
as shown in the code, four variables input: diff_expr,diff_coex, klist, Pop_size, are included in the function. However, within the function, another variable "vector" is utilized in some subfunction. How they get its value? thx get_quantiles <-function(diff_expr,diff_coex,klist,pop_size){ #

[R] using csv file for stacked bar plot, rows to columns

2011-10-12 Thread Davis_fishgirl
**NEW TO R**-been trying to teach myself with no prior experience in computer languages, so I apologize if I am poor at using technical terms Hi, I have perused some of the previous posts on this topic and tried their solutions, but am still coming up with error messages(sometimes more than 50 at

Re: [R] strange behavior with R.dll

2011-10-12 Thread Joshua Wiley
I regularly have the R.dll removed. AFAI can tell, it depends partly on how aggressive a heuristic level you have chosen, in part I think related to the number of users. In any case you can restore it and set a rule to have it ignored. I suppose you could tell symantec, but it's never been en

Re: [R] strange behavior with R.dll

2011-10-12 Thread Duncan Murdoch
On 11-10-12 7:54 PM, Joshua Wiley wrote: I regularly have the R.dll removed. AFAI can tell, it depends partly on how aggressive a heuristic level you have chosen, in part I think related to the number of users. In any case you can restore it and set a rule to have it ignored. I suppose you

Re: [R] strange behavior with R.dll

2011-10-12 Thread Joshua Wiley
On Oct 12, 2011, at 17:23, Duncan Murdoch wrote: > On 11-10-12 7:54 PM, Joshua Wiley wrote: >> I regularly have the R.dll removed. AFAI can tell, it depends partly on how >> aggressive a heuristic level you have chosen, in part I think related to the >> number of users. In any case you can re

Re: [R] using csv file for stacked bar plot, rows to columns

2011-10-12 Thread Sarah Goslee
Hi, On Wed, Oct 12, 2011 at 6:11 PM, Davis_fishgirl wrote: > > **NEW TO R**-been trying to teach myself with no prior experience in > computer languages, so I apologize if I am poor at using technical terms > Hi, I have perused some of the previous posts on this topic and tried their > solutions,

Re: [R] getting data associated with coordinates in a spatial data frame

2011-10-12 Thread Sarah Goslee
Hi, On Wed, Oct 12, 2011 at 3:37 PM, Bailey, Daniel wrote: > If I know the specific coordinate in a spatial data frame, how can I access > the data at that coordinate? > > My coordinates are labeled "x" and "y" in a data.frame "e". The data is in > column "leachate". > I want to say, basically:

Re: [R] R and Forex

2011-10-12 Thread R. Michael Weylandt
I suppose you could, contingent on the broker end's functionality, and R does provide some socket support (see ?make.socket and ?connections among others) but I suspect your question is entering the domain of the R-devel list where the experts on the nitty gritty could give you better answers th

[R] pass an element in a list() from R to C

2011-10-12 Thread teazrq
Hi all, I'm new to this "call C from R" so bear with me. I'v been writing some C code and compile it to .dll files that can be called from R. It was successful until today, when I start a new part of this project. So, my R code passes arguments to this C code, and these arguments including some in

Re: [R] R and Forex

2011-10-12 Thread Yves S. Garret
Don't see myself making 'real-time' trades. Most likely a few times an hour. Oh, can't you make a socket to another app in R? That would be my first approach. On Wed, Oct 12, 2011 at 6:53 PM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > Just a comment on the lack of a direct R AP

[R] US States percentage change plot

2011-10-12 Thread Michael Charles Bailey I
Hi, I would like to make a plot of the US states (or lower 48) that are colored based upon a percentage change column. Ideally, it would gradually be more blue the larger the positive change, and more red the more negative is the change. The data I have looks like: State Percent.Change 1

[R] Help with R plots

2011-10-12 Thread Jonathan Edwin
Hi all, Mind my ignorance and complete newbiness, but I am very new to R and am currently learning it through my stats course at university. My question is regarding adding titles to plots. I'll post the code below, and then explain my issue: > hist(gender$HeartRate) > title(Histogram: HeartRate

Re: [R] R and Forex

2011-10-12 Thread Yves S. Garret
I'm a little vague on what constitutes r-help and r-devel lists in terms of what questions to ask and where. I read a little bit that this list was about design and what you could do in R, but coding should be in r-devel. If I'm wrong, please clarify. On Wed, Oct 12, 2011 at 9:12 PM, R. Michael

Re: [R] Help with R plots

2011-10-12 Thread Weidong Gu
try hist(gender$HeartRate,main='Histogram: HeartRate distribution for Temperature Data') Weidong Gu On Wed, Oct 12, 2011 at 8:44 PM, Jonathan Edwin wrote: > Hi all, > > Mind my ignorance and complete newbiness, but I am very new to R and am > currently learning it through my stats course at un

Re: [R] R and Forex

2011-10-12 Thread R. Michael Weylandt
To be honest, I don't frequently have occasion to wander over to R-devel and most of what goes on over there is over my level of easy-readability but I'd feel pretty confident that anything involving interface to another program on a socket or lower level is squarely their territory while file-r

Re: [R] R and Forex

2011-10-12 Thread Joshua Ulrich
Yves and Michael, R-devel is the place for programming questions that would be confusing to most people who follow R-help. Posting to R-devel would make sense if you've written socket connections between applications in other languages and are having trouble sorting out how to do it in R. If you

Re: [R] How to transfer the variable into function in this code?

2011-10-12 Thread R. Michael Weylandt
As provided, the function you give doesn't actually do anything, it only defines some subfunctions which are removed upon completion of the function call. If that were the actual function, you would be right to be confused, but the provided code doesn't give the proper context to the problem. You

Re: [R] plot probability density function (pdf)

2011-10-12 Thread pigpigmeow
thank you all of u -- View this message in context: http://r.789695.n4.nabble.com/plot-probability-density-function-pdf-tp3897055p3900396.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.et

[R] Comparing the components of a data frame without levels interfering

2011-10-12 Thread swonder03
*Bottom Line: How can I compare the individual components of two data frames with different row lengths without the levels interfering?* Example: I have two data frames to those respectively named 'dfCity' and 'dfState' that have the following output: dfCity Name City 1Bill

Re: [R] pass an element in a list() from R to C

2011-10-12 Thread teazrq
so, I did this: B= list("a" = 1, "b" = 2, "c" = 3) .C("myfunction", B) the c code is : SEXP myfunction(SEXP matrix_temp) { Rprintf("this element is %6.3f", REAL(VECTOR_ELT(matrix_temp,1))[0]); } but after runing the R code, it says Error: VECTOR_ELT() can only be applied to a 'list', not

[R] Package snow: is there any way to check if a cluster is "acticve"

2011-10-12 Thread Søren Højsgaard
Is there a 'proper' way of checking if cluster is active. For example, I create a cluster called .PBcluster > str(.PBcluster) List of 4 $ :List of 3 ..$ con :Classes 'sockconn', 'connection' atomic [1:1] 3 .. .. ..- attr(*, "conn_id")= ..$ host: chr "localhost" ..$ rank: int 1 ..- at

Re: [R] Comparing the components of a data frame without levels interfering

2011-10-12 Thread Petr PIKAL
Hi > *Bottom Line: How can I compare the individual components of two data frames > with different row lengths without the levels interfering?* > > Example: I have two data frames to those respectively named 'dfCity' and > 'dfState' that have the following output: > > dfCity > > Name

Re: [R] Comparing the components of a data frame without levels interfering

2011-10-12 Thread Jeff Newmiller
Factors include a comprehensive list of all possible values they can assume. Your name columns have different numbers of names, so they are really very different factors. The best solution for you is to convert those columns to character. You also ought to learn how to use the merge function be

Re: [R] Help with R plots

2011-10-12 Thread Jeff Newmiller
All complete newbies should read the posting guide referenced at the bottom of every message. One of the rules mentioned there is that this is not the appropriate venue for homework questions, since you have an instructor to get you up to speed. When you finish the course and are familiar with t

[R] KS test

2011-10-12 Thread anuradha guru
Hi! how can I do the Kolmogorov Smirnov test for discrepancy between the estimated and empirical tails? Regards Anuradha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

[R] Simple Effects Analysis for ANOVA

2011-10-12 Thread robcinm
For an ANOVA class assignment, we are doing post-hoc tests for interactions. For simple effect analysis on an interaction, I went through a really convoluted process to get my statistics and want to know if there is a more straightforward way. I have a 3x2 design with self-concept 1:3 (low, moder

[R] using dynamic variable names

2011-10-12 Thread Sasso Kocovski
Hi, hopefully you can help me out - thanks in advance. I would like to assign variable (or vectors) names dynamically, hence, after you assign the number of new vectors then they populate for use later in the algorithm. Below is an example: n<-5 for (i in (1:n)) { vector_i <- c(1:10) } Here wha

[R] nls: singular convergeance

2011-10-12 Thread Redding, Matthew
Dear R-experts, I have 28 data points that I would like to fit with a non linear broken-stick -- with three fitted parameters. When I view trace -- and use the final values as lines on the graph of data -- it looks pretty good. Q1. Why am I getting singular convergeance? Q2. Can you suggest anot

<    1   2