similar to: lapply assign to list

Displaying 20 results from an estimated 10000 matches similar to: "lapply assign to list"

2008 Jul 14
2
Insurance review statistical methods
Hi R users: I will like to know if somebody works on insurance statistics (actuarial problems) and had use TRICAST, and can tell me if with all the R tools it can be build a solution like TRICAST or similar. In a word: Do you think that R has all the statistical tools (I mean modeling tools) to make a job similar to TRICAST? Does TRICAST has modeling tools that are not implemented on R yet?
2009 Dec 03
1
Acumulate assign on lapply list
Hi R users: f1<-function(l1,idx){   f2<-function(i,l1)   l1[[i+1]]<<-c(l1[[i]],l1[[i+1]][-1])   lapply(idx,f2,l1)   return(l1) } l<-list(c(1,2,3),c(4,5),c(6,7,8)) l2<-f1(l,1:(length(l)-1)) l2 I got: [[1]] [1] 1 2 3 [[2]] [1] 1 2 3 5 [[3]] [1] 4 5 7 8 But what I want in the last position of l2 is the acummualte of the assignations... I would like to have: [[1]] [1] 1 2
2002 Apr 11
14
Ordinal categorical data with GLM
Hello All: I am trying to replicate the results of an example found in Alan Agresti's "Categorical Data Analysis" on pages 267-269. The example is one of a 2 x 2 cross-classification table of ordinal counts: job satisfaction and income. I am able to get Agresti's results for the independence model (G^2 = 12.03 with df = 9) assuming as he does that the data is nominal, but
2002 Nov 29
2
Obtaining the variable names of a glm object
Is names(model1$coef) what you're looking for? -----Original Message----- From: Kenneth Cabrera [mailto:krcabrer at epm.net.co] Sent: 29 November 2002 10:36 Cc: R-help at stat.math.ethz.ch Subject: [R] Obtaining the variable names of a glm object Hi, R users! Suppose I make a model like this:
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 plot(1:5,1:5,type="n") legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2) Thank you for
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users: I will like to have a legend with math symbols and also with the value of a variable. But I cannot obtain both at the same time (symbol + value of a variable): Here is a reproducible example: m1<-5 m2<-12 plot(1:5,1:5,type="n") legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2) Thank you for
2009 Oct 30
2
Names of list members in a plot using sapply
Hi R users: I got this code to generate a graphic for each member of a lists. list1<-list(A=data.frame(x=c(1,2),y=c(5,6)),B=data.frame(x=c(8,9),y=c(12,6))) names1<-names(list1) sapply(1:length(list1),function(i) with(list1[[i]],plot(x,y,type="l",main=paste("Graphic of",names1[i])))) Is there a more elegant solution for not to use two separate lists? I would like to
2002 Jul 26
4
chi square test is not appropriate? but what test is
Hallo all Suppose I have a summary amount of various colours used in different areas colour plastic paint black 15.5 173.8 brown 6.0 523.2 green 2.5 6.4 red 77.1 237.4 yellow 144.6 77.3 It seems that there are some preferable colours in these two areas (yellow in plastic, brown an red in paint). The problem seems to me similar to chi square test but it is intended for testing counts or
2002 Aug 12
5
programming in R
I have a probably basic problem concerning the R language. I will write some small R programs but don't really know how to start. Do I have to create my files in some editor like emacs or can I write my code in the R prompt? How to compile the code? I haven't found any good manual parts about this subject. regards A.P
2002 Sep 23
2
R crash with internet2.dll
Hi, I'm using: platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 5.1 year 2002 month 06 day 17 language R and I would like to apply: > update.packages() trying URL
2007 Apr 30
2
A problem with svIDE in Tinn-R?
Hi R users: I want to know if any one of you had the problem with Tinn-R, when you call the library svIDE on the new R 2.5.0, (because in the old R 2.4.1 works with out any problem). I got this message: > library(svIDE) Loading required package: tcltk Loading Tcl/Tk interface ... done Warning messages: 1: '\A' is an unrecognized escape in a character string 2: no se reconoce el valor
2002 Sep 29
2
Problem on minima
2011 Apr 07
2
Two functions as parametrs of a function.
Hi R users: I'm trying to make a function where two of the parameters are functions, but I don't know how to put each set of parameters for each function. What am I missing? I try this code: f2<-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){ force(fun1) force(fun2) force(n) p1<-unlist(par1) p2<-unlist(par2) force(p1) force(p2)
2006 Mar 08
1
Mixed GLM methodology and execution question
Hi all, I have a question regarding how to properly analyze a data set and then how to perform the analysis in R. First, I have data that I would like to analyze using a mixed GLM (I think this is the most appropriate method, but I am unsure). In a mixed model (y = X*beta+Z*gamma+epsilon), I would like to structure the variance matrices of gamma, G, and the error, R, to take advantage of all my
2007 Jul 09
1
Help in installing rggobi in ubuntu linux
Hi R users. I am experimenting with ubuntu 7.04 Feisty. I install the ggobi package with apt-get. I got almost all the packages, but when I try to obtain rggobi, I got this message: ------------------------------------------------------------------------------------------------- install.packages("rggobi") Aviso en install.packages("rggobi") : argument 'lib' is
2010 Sep 14
4
Problems with "pdf" device using "plot" "glht" function on "multcomp" library.
Hi R users: I have de following data frame (called "Sx") Descripcion Nitratos Cont85g 72.40 Cont85g 100.50 Cont85g 138.30 Cont80g 178.33 Cont80g 79.01 Cont80g 74.16 Cont75g 23.70 Cont75g 15.80 Cont75g 16.20 Patron80g
2010 Feb 01
3
A newbee problem compiling R in ubuntu.
Dear R users: Maybe it is a silly question, but I'm don't understand what am I doing wrong (I make the same steps, and it works). In a new karmik koala ubuntu installation I compile the last patched 2.10.1 version of R (r51070). Every thing was right (I install all the dev libraries I need). First I type: ./configure --enable-R-shlib And I obtain: R is now configured for
2008 Nov 11
1
thickness of boxplots
Hi R users: How can I obtain with bwplot boxplots with bwplot whose box width will vary acording to other variable. bwplot(categ1~continuos|categ2,box.ratio=continuos2,data=data.base) But it doesn't work as I expected. Thank you for your help. Kenneth
2010 Apr 01
1
Stack with factors
Hi R users: I found that I cannot stack() a data.frame with factors. db1<-data.frame(replicate(6,factor(sample(c("A","B"),6,replace=TRUE)))) str(db1) db2<-stack(db1) db2 "db2" does not have any row. How can I stack them by the variables X1,X2,...,X6? Thank you for your help. Kenneth
2011 Oct 13
1
Legend symbols (line, points) in one column.
Dear R users: I want to have in the same column both symbols, line and points, one for a data, and the other for the model. How can I do that? Or is there other better form to show both data and model in the same graphic? I need to make the difference on time of the same subject (repeated measurements on time) Problem example: ###########################################################