1. C

    Gam calculations on groups of data and modeling on an xyplot

    Hi there, I am hoping someone will be able to help me with a problem I have been having. I haven’t used R much so I am sorry if it is really obvious. I have a dataset that contains population values for certain years. In the dataset there are different ID groups with a number of years...
  2. A

    maximum logistic function

    how can maximum the \sum\limits_{j=1}^{J}{\sum\limits_{t=1}^{T}{h_{jt}(x_t;\theta)\dfrac{e^{\alpha_j+X\beta}}{\sum\limits_{l=1}^{L}{e^{\alpha_l+X\beta}}}}} where h_{jt} is known and\alpha and \beta=(\beta_1,\ldots,\beta_s) are parameter and must be estimate.
  3. Q

    Scatter graph formatting help in R

    Hello all, I'm currently doing a project which I'm trying to use R with to get more familiar with it. I've run into a problem with scatter graphs. The one below, for example, shows the area of occurrence/occupancy of individual species within a genus of marine organism plotted against the...
  4. Y

    Randomizing variables to get the best combination for high R-squared values in R

    Hi, I've been spending quite some time to figure out how I can get the best R squared value from randomization of some values in a linear regression equation. I have allele frequency data and 14 environmental gradient data. Allele frequency value is fixed, but 2~14 combinations of the 14...
  5. A

    install packages from local tar.gz file in linux

    Hi, how I can install package from local tar.gz file??? please give me a sample tnx...
  6. W

    (Easy) question about 'apply' on arrays

    Hello everyone! So... I am trying to learn how to correctly use the 'apply' function while learning something about the Wishart distribution. R has a function called 'rWishart' where you can sample random positive-definite matrices and store them in lists. From the official documentation I...
  7. J

    Repeated Measures Non-Parametric nparLD Pacakge

    Hi, I'm trying to analyze repeated measurements of body temperature data collected from 7 randomly chosen subjects (e.g. turtles). I am using R, along with the nparLD package. I am using Nonparametric Tests for my LD-F2 Design (http://www.inside-r.org/packages/cran/nparLD/docs/ld.f2) because...
  8. T

    Splitting a matrix

    Hi, I have a matrix x with 97 rows and used the function sample like this : rownumbers=sample(1:97,size=70) data1=x[rownumbers,] I'm having trouble to get the rows which are not inside data1 into another matrix. Does anyone have an idea? greets, Taibo
  9. L

    Markov Decision Process package?

    Hello all: I posted a similar question in the SAS forum (asking if SAS had the capabilities of doing some type of Markov Decision Process). Since I am not convinced that it does (there is a PROC MCMC but I do not think it is technically for the Markov Decision Process, just the Markov Chain)...
  10. N

    Power of t-test

    Hello all, I want to write an R procedure that calculates the power of a simple two samples t-test. Does anyone here has an idea how to do it ? Thank you !
  11. L

    Split string

    Is there any way of splitting AnonEtAl2013 into Anon Et Al 2013 All attempts have failed so far
  12. L

    Add dotcharts next to boxplots

    I've got all the box plots: boxplot( Daten$Gewicht~interaction(Daten$Dosis,Daten$Geschlecht, drop=TRUE), ylab="relative Nierengewichte", xlab="Dosisgruppen der beiden Geschlechter") and the points overlapping the box plots: points( Daten$Gewicht~interaction(Daten$Dosis,Daten$Geschlecht...
  13. L

    count frequency

    my dataset looks like this in the beginning: Dosis weight sex 1 0 6.62 m 2 0 6.65 m 3 0 5.78 m 4 0 5.63 m 5 0 6.05 m 6 0 6.48 m 7 0 5.50 m 8 0 5.37...
  14. L

    Modifying X axis

    Hi, I'm pretty new to R, and I have a question about plots. I've made a histogram about my data, but because i have very few data above 5, i grouped them all in '>5'. So I want my X axis like: 0 1 2 3 4 5 >5. Now I've got: 0 1 2 3 4 5 6 and >5 is written 'under' the 6. This is the code...
  15. T

    Function Lines (error when used with fitted values of a truncated regression model)

    Hi everyone, I'm having some trouble with the function lines() in R. Here is an example of the code: <code> x=rnorm(100) y=10+2*x+pmax(x-0.5,0)+pmax(x-0.7,0) model=lm(y~x+pmax(x-0.5,0)+pmax(x-0.7,0)) plot(x,model$fitted.values) lines(x,model$fitted.values) </code> I want the function lines...
  16. L

    installing rpud got unrecognized option '-Wl'

    I am trying to install the package rpud on a CENTOS Linux server and got the following error: /usr/local/cuda/bin/nvcc -shared -Xlinker " -Wl,-rpath,/usr/local/cuda/lib64" -L/usr/local/cuda/lib64 -lcublas -lcuda rpud.o rpudist.o -o rpud.so /usr/bin/ld: unrecognized option '-Wl' /usr/bin/ld...
  17. P

    quick way to repeat code?

    Hi All! This is my first post on this website (have been reading it for months though) so please bear with me if I don't do things right :) The question I need to answer is how many rolls of a dice (in this case with 10 sides) it takes before I have seen every side. From that I need to say...
  18. A

    R unable to access internet to install packages

    I am having some trouble trying to install a number of packages in R on my work computer. An example of the code I am using is as follows: install.packages("ggplot2",dependencies=TRUE) An example of the error messages I am getting is: Warning: unable to access index for repository...
  19. A

    Reading XML in R

    Hi, I am just starting to use R for the first time. I am trying to figure out how to read XML is R. Does anyone know how to do that? Also, does R prescribe an XML schema? Thanks, Alisha
  20. M

    plot points that fall within an interest area

    I want to find which points fall within an interest area, and then plot only those points. Here is a basic example. install.packages("sp") #install package that allows usage of point in polygon library(sp) x <-1:10 y <- 1:10 #polygon is plotted as (1,1) (6,1) (6,5) (1,5) inIA <-...