Re: [R] Loading Dataset into R continual issue
Thank you. I was able to get it loaded however when I tried to run mod1<-lm(Pat2006~FHouse) I got Error in eval(expr, envir, enclos) : object 'Pat2006' not found What exactly is occurring here? -- View this message in context: http://r.789695.n4.nabble.com/Loading-Dataset-into-R-continual-issue
Re: [R] help matching observations for social network data
Your data.frame is d <- data.frame( ego = c(1, 1, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6), alter = c(2, 3, 1, 4, 1, 2, 4, 6, 1, 3, 6, 4)) and you want to get e <- data.frame( ego = c(1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6), alter2 = c(4, 2, 4, 6, 3, 1, 2, 1, 4, 1, 4,
[R] i dont know what function do i have to make for ("The number of lines in the body of the email")
i tried to make function about "The number of lines in the body of the email" and i have three values which are emailtestset1, emailtestset2, and emails. what i have to do? -- View this message in context: http://r.789695.n4.nabble.com/i-dont-know-what-function-do-i-have-to-make-for-The-number-o
[R] glm.fit: fitted probabilities numerically 0 or 1 occurred?
Hi all, I am doing bootstrap with logistic regression by using glm function, and I get the errors; glm.fit: fitted probabilities numerically 0 or 1 occurred and glm.fit: algorithm did not converge I have read some things about this issue in the mailing list. I can guess what was the problem. My
[R] Error in fitdist- mle failed to estimate parameters
Hi, I am trying fit certain data into Beta distribution. I get the error saying "Error in fitdist(discrete_random_variable_c, "beta", start = NULL, fix.arg = NULL) : the function mle failed to estimate the parameters, with the error code 100" Below is the sorted data that I am trying to fit.
[R] help matching observations for social network data
Greetings R folks, I am stuck on a problem that I suspect can be solved somewhat easily. I have social network data stored in dyads as below, where the numbers representing ego and alter are identifiers, so that number 1 as an ego is the same person as number 1 as an alter etc. ego a
Re: [R] passing xlim to coord_map in ggplot2
Hi Zack, It would help a lot if you can give a reproducible example that generates the error. Best, Ista On Tue, Mar 20, 2012 at 3:05 PM, z2.0 wrote: > This works: > michigan <- map_data('county', 'michigan') > mich_points <- data.frame(x = rnorm(n = 200, median(michigan[,1]), 0.75), y > = rnor
Re: [R] anova.lm F test confusion
msteane hotmail.com> writes: > > I am using anova.lm to compare 3 linear models. Model 1 has 1 variable, > model 2 has 2 variables and model 3 has 3 variables. All models are fitted > to the same data set. (I assume these are nested models, otherwise the analysis doesn't make sense ...) >
Re: [R] Problem reading mixed CSV file
On Tue, Mar 20, 2012 at 3:17 PM, Ashish Agarwal wrote: > Given x<- count.fields(..) could you pls help in following: > 1. how to create a data vector with data being line numbers of original file > where x==6? That is what the expression: writeLines(input[x == 6], file = '6fields.csv') is doin
Re: [R] scientific notation in a data frame
Thank you! On Tue, Mar 20, 2012 at 8:39 PM, David Winsemius wrote: > > On Mar 20, 2012, at 7:52 PM, Laura Rodriguez Murillo wrote: > > Dear list, >> I have a data frame where one of the columns are p values with scientific >> notation mixed with regular numbers with decimals. >> >>> a=data frame
Re: [R] scientific notation in a data frame
On Mar 20, 2012, at 7:52 PM, Laura Rodriguez Murillo wrote: Dear list, I have a data frame where one of the columns are p values with scientific notation mixed with regular numbers with decimals. a=data frame a P OR N 0.50 0.7500 237 0.047 1.1030 237 0.124 0.7742 237 0.124 0.774
[R] scientific notation in a data frame
Dear list, I have a data frame where one of the columns are p values with scientific notation mixed with regular numbers with decimals. >a=data frame >a P OR N 0.50 0.7500 237 0.047 1.1030 237 0.124 0.7742 237 0.124 0.7742 237 0.0080 1.1590 237 0.50 0.7500 237 4.5e-07 1.2 237 5.6e-04 0.
Re: [R] What is the correct syntax of "for" or "if" in Rexcel
A) This is the wrong list for StatConn questions. B) My guess would be that you need to send the entire loop in one call. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#
Re: [R] Not colour but symbols
However, you *can* do it in R. For example, the function to draw histograms filled with lines is hist(). -thomas On Wed, Mar 21, 2012 at 9:31 AM, Bert Gunter wrote: > Don't do this! > > Google on "chartjunk" to learn why not. > > -- Bert > > On Tue, Mar 20, 2012 at 12:11 PM, Komine wrote: >
[R] Running BayesFst in R
Hi All, I am trying to plot outlier loci in R from data generated by BayesFst. The developers provide the code which I use but I can't seem to get it to work consistently. Sometimes I can get R to generate a plot (without confidence intervals or loci IDs) and other times I cannot even generate P-
[R] labeling rows in heatmap.2
how can i put the row labels on the left hand of the heatmap in heatmap.2? abnr<-structure(c(1, 0.678622097406395, 0.670294749652918, -0.0016314464654279, -0.000519068106572792, 0.199581999119988, -0.0106623494189115, 0.0840111691399559, -0.0461494399639137, 0.249279171677728, NA, 1, 0.75711406
[R] What is the correct syntax of "for" or "if" in Rexcel
Hello thankful R friends, Can I use iteration (for) or conditional (if) syntax in rexcel using rrun? I've finished coding my program and want to run through Excel. I just want to run such as Call rinterface.RRun("for(i in 1:10){") Call rinterface.RRun("a[i,1]<-i") Call rinterface.RRun("}") But i
Re: [R] Remove individual rows from a matrix based upon a list
Hello, > > Thanks in advance for any help. I have a square matrix of measures of > interactions among individuals and would like to calculate a values from a > function (colSums for example) with a single individual (row) excluded in > each instance. That individual would be returned to the matr
Re: [R] Not colour but symbols
Don't do this! Google on "chartjunk" to learn why not. -- Bert On Tue, Mar 20, 2012 at 12:11 PM, Komine wrote: > Hi, > Instead to put colour in my histogram, > I want to put symbols like lines, dots etc. > Do you know the function that does it? > Thank you in advance > > > -- > View this messag
[R] anova.lm F test confusion
I am using anova.lm to compare 3 linear models. Model 1 has 1 variable, model 2 has 2 variables and model 3 has 3 variables. All models are fitted to the same data set. anova.lm(model1,model2) gives me: Res.DfRSS Df Sum of Sq FPr(>F) 1135 245.38
Re: [R] Wrong output due to what I think might be a data type issue (zoo read in problem)
Ah I see. Thank you very much Gabor and Joshua. Yes that makes sense since in C, alpha characters are represented in single quotes as to represent the ASCII value hence 'M'. I would've never imagined the raw data would be so lame like that though. Thanks again! -- View this message in context: h
[R] Problem in loop
Dear R users I want change the entries in a matrix. I did a matrix A=0 1 5 .3 0 0 0 .5 0 A1<-A A2<-A*0.90 A2 12 3 1 0.00 0.90 4.5 2 0.27 0.00 0.0 3 0.00 0.45 0.0 I need replace elements one by one in a loop I tried the following using package POPBIO, total <-ma
Re: [R] Remove quotes from a string to use in a variable call
Hello, dadrivr wrote > > Hi, > > I have a string that I want to use in a variable call. How can I remove > the quotes and/or the string properties of the string to use it in a > variable call? > > Here's an example: > > library(nlme) > fm2 <- lme(distance ~ age, data = Orthodont, random = ~
[R] passing xlim to coord_map in ggplot2
I'm sure this is smack-head moment, but I haven't been able to find an example of this on Nabble or SO, so thought I'd ask. This works: michigan <- map_data('county', 'michigan') mich_points <- data.frame(x = rnorm(n = 200, median(michigan[,1]), 0.75), y = rnorm(n = 200, median(michigan[,2]), 0.75
[R] Not colour but symbols
Hi, Instead to put colour in my histogram, I want to put symbols like lines, dots etc. Do you know the function that does it? Thank you in advance -- View this message in context: http://r.789695.n4.nabble.com/Not-colour-but-symbols-tp4490030p4490030.html Sent from the R help mailing list archi
Re: [R] anova.lm F test confusion
Sorry...typo ***<-- I don't get why the MSE of model 3 is being included if we're comparing Model 2 to Model 1 -- View this message in context: http://r.789695.n4.nabble.com/anova-lm-F-test-confusion-tp4490211p4490220.html Sent from the R help mailing list archive at Nabble.com. __
Re: [R] igraph: decompose.graph: Error: protect(): protection stack overflow
On 12-03-20 2:20 PM, Sam Steingold wrote: I just got this error: library(igraph) comp<- decompose.graph(gr) Error: protect(): protection stack overflow Error: protect(): protection stack overflow what can I do? the digraph is, indeed, large (300,000 vertexes), but there are very many very s
Re: [R] cv.glmnet
On Mar 20, 2012, at 3:17 PM, Patrick Breheny wrote: On 03/20/2012 09:41 AM, Yuanyuan Tang wrote: Does anybody know how to avoid the intercept term in cv.glmnet coefficient? When I say "avoid", it does not mean using coef()[-1] to omit the printout of intercept, it means no intercept at all
Re: [R] Problem reading mixed CSV file
Given x<- count.fields(..) could you pls help in following: 1. how to create a data vector with data being line numbers of original file where x==6? 2. what is the way to read only the nth line (only) of an input file into a data vector with first three attributes to be read as string, 4th being ca
Re: [R] Lag based on Date objects with non-consecutive values
On Mon, Mar 19, 2012 at 9:11 PM, Gabor Grothendieck wrote: > > > On Mon, Mar 19, 2012 at 8:03 PM, Sam Albers > wrote: >> >> Hello R-ers, >> >> I just wanted to update this post. I've made some progress on this but >> am still not quite where I need to be. I feel like I am close so I >> just wante
[R] job opening at Merck Research Labs, NJ USA
The Biometrics Research department at the Merck Research Laboratories has an open position to be located in Rahway, New Jersey, USA: This position will be responsible for imaging and bio-signal biomarkers projects including analysis of preclinical, early clinical, and experimental medicine imag
Re: [R] cv.glmnet
On 03/20/2012 09:41 AM, Yuanyuan Tang wrote: Does anybody know how to avoid the intercept term in cv.glmnet coefficient? When I say "avoid", it does not mean using coef()[-1] to omit the printout of intercept, it means no intercept at all when doing the analysis. Thanks. I do not believe that
Re: [R] Problem with RMA using limma, oligo and pdInfoBuilder packages
Dear Martin I just start to learn how analise microarray data by bioconductor. I use ragene.1.1.st.v1.v1 from affymetrix. I try to find some info in internet, but your example was the most useful for me . Now I done exacly this same witch tou descirbe and I got results file. I would like to than
Re: [R] Graphic legend with mathematical symbol, numeric variable and character variable
There are a few different ways to do this; see the examples in ?plotmath under the heading "How to combine 'math' and numeric variables". -- Patrick Breheny Assistant Professor Department of Biostatistics Department of Statistics University of Kentucky On 03/20/2012 09:09 AM, "ECOTIÈRE David (R
Re: [R] igraph: decompose.graph: Error: protect(): protection stack overflow
> * Sam Steingold [2012-03-20 14:20:06 -0400]: > > I just got this error: >> library(igraph) >> comp <- decompose.graph(gr) > Error: protect(): protection stack overflow > Error: protect(): protection stack overflow >> after restarting > system.time(comp <- decompose.graph(gr, mode="weak")) Err
[R] igraph: decompose.graph: Error: protect(): protection stack overflow
I just got this error: > library(igraph) > comp <- decompose.graph(gr) Error: protect(): protection stack overflow Error: protect(): protection stack overflow > what can I do? the digraph is, indeed, large (300,000 vertexes), but there are very many very small components (which I would rather not
Re: [R] Remove leading and trailing white spaces
This just saved me a lot of time. Thank you! Daniel -- View this message in context: http://r.789695.n4.nabble.com/Remove-leading-and-trailing-white-spaces-tp907851p4489725.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj
Re: [R] error message
On Mar 20, 2012, at 10:36 AM, adamu eloji wrote: Dear all, Who will bail me out. You seem to be doing homework. This is not a mailing list for homework. Iam using R with S-Splancs. What is that? You cannot use S packages with R unless someone has ported it. Anytime i typed in the sy
[R] Remove quotes from a string to use in a variable call
Hi, I have a string that I want to use in a variable call. How can I remove the quotes and/or the string properties of the string to use it in a variable call? Here's an example: library(lme) fm2 <- lme(distance ~ age, data = Orthodont, random = ~ 1) summary(fm2) I want to update the above reg
[R] How to write and analyze data with 3 dimensions
Suppose I have data organized in the following way: (P_i, M_j, S_k) where i, j and k and indexes for sets. I would like to analyze the data to get for example the following information: what is the average over k for (P_i, M_j) or what is the average over j and k for P_i. My question is what woul
Re: [R] Unique in DataFrame
Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Unique-in-DataFrame-tp4488943p4489554.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help
Re: [R] SE from nleqslv
You haven't said how the function you're optimizing relates to your data. In the special case that you happen to be using nleqslv to maximize a log-likelihood function (a special case of which is least squares fitting), you can get an approximation to the standard error using the Jacobian matrix th
Re: [R] SE from nleqslv
> > Well, the delta method springs to mind, but it really depends on how and > where noise is being injected into the system. All we have been told is that > the estimates are obtained as a solution to a nonlinear equation, and that > can mean many things. Presumably there are some observat
Re: [R] SE from nleqslv
On Mar 20, 2012, at 15:55 , Berend Hasselman wrote: > > On 20-03-2012, at 15:36, FU-WEN LIANG wrote: > >> On Tue, Mar 20, 2012 at 4:24 AM, Berend Hasselman wrote: >>> >>> >>> On 20-03-2012, at 01:01, FU-WEN LIANG wrote: >>> Dear R-users, I use the "nleqslv" function to get p
[R] MA process in panels
Dear R users, I have an unbalanced panel with an average of I=100 individuals and a total of T=1370 time intervals, i.e. T>>I. So far, I have been using the plm package. I wish to estimate a FE model like: res<-plm(x~c+v, data=pdata_frame, effect="twoways", model="within", na.action=na.omit) …w
[R] Remove individual rows from a matrix based upon a list
Dear All, Thanks in advance for any help. I have a square matrix of measures of interactions among individuals and would like to calculate a values from a function (colSums for example) with a single individual (row) excluded in each instance. That individual would be returned to the matrix befo
Re: [R] Problem reading mixed CSV file
use 'count.fields' to determine which line have 6 and 7 fields in them. then use 'readLines' to read in the entire file and the use the data from count.fields to write out to separate files" x <- count.fields(...) input <- readLines(..) writeLines(input[x == 6], file = '6fields.csv') writeLines(i
Re: [R] error message
You have a syntax error: > dat.<-read.table(''chesire_fmd.cvs'',header=TRUE,sep='',) Error: unexpected symbol in "dat.<-read.table(''chesire_fmd.cvs" notice the sep='', probably should be sep = ',' On Tue, Mar 20, 2012 at 10:36 AM, adamu eloji wrote: > Dear all, > > Who will bail me out. Ia
Re: [R] Unique in DataFrame
This may be what you want: > x<-data.frame(city="Barcelona",sales=253639) > x<-rbind(x,data.frame(city="Madrid",sales=223455)) > x<-rbind(x,data.frame(city="Lisbon",sales=273633)) > x<-rbind(x,data.frame(city="Madrid",sales=266535)) > x<-rbind(x,data.frame(city="Barcelona",sales=258369)) > x<-rbin
Re: [R] error message
You left a quotation mark out of your very first statement, and then some others. Quotation marks must be balanced. Try this instead: setwd("C:\\TEMP") dat <- read.table("cheshire_fmd.cvs",header=TRUE, sep=",") dat[1:10,] Sarah On Tue, Mar 20, 2012 at 10:36 AM, adamu eloji wrote: > Dear all,
Re: [R] Plot method for ca.jo
?getMethod getMethod("plot", c("ca.jo", "missing")) -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Keith Weintraub Gesendet: Dienstag, 20. März 2012 16:36 An: r-help@r-project.org Betreff: [R] Plot method for ca.jo Folks,
[R] error message
Dear all, Who will bail me out. Iam using R with S-Splancs. Anytime i typed in the syntex, an error will appear eg setwd("C:\\TEMP) >dat <- read.table(cheshire_fmd.cvs",header=TRUE, sep=",") > dat.<-read.table(''chesire_fmd.cvs'',header=TRUE,sep='',) Error: unexpected symbol in "dat.<-read.table
Re: [R] Problem reading mixed CSV file
The file is 20MB having 2 Million rows. I understand that I two different formats - 6 columns and 7 columns. How do I read chunks to different files by using scan with modifying skip and nlines parameters? On Mon, Mar 19, 2012 at 3:59 PM, Petr PIKAL wrote: > > I would follow Jims suggestion, > n
[R] Plot method for ca.jo
Folks, How would I find the code for a plot function that is in a package? I want to understand exactly what is being plotted. Thanks, KW -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai
Re: [R] Constraint Linear regression
On Tue, Mar 20, 2012 at 12:54 AM, priya fernandes wrote: > Hi there, > > I am trying to use linear regression to solve the following equation - > > y <- c(0.2525, 0.3448, 0.2358, 0.3696, 0.2708, 0.1667, 0.2941, 0.2333, > 0.1500, 0.3077, 0.3462, 0.1667, 0.2500, 0.3214, 0.1364) > x2 <- c(0.368, 0.53
Re: [R] SE from nleqslv
On 20-03-2012, at 15:36, FU-WEN LIANG wrote: > On Tue, Mar 20, 2012 at 4:24 AM, Berend Hasselman wrote: >> >> >> On 20-03-2012, at 01:01, FU-WEN LIANG wrote: >> >>> Dear R-users, >>> >>> I use the "nleqslv" function to get parameter estimates by solving a >>> system >>> of non-linear equatio
Re: [R] Reshaping data from long to wide without a "timevar"
Hi Michael, Sorry, my description seems to have been less than adequate. I want my transposed data to look something like: Subject Drug.1 Drug.2Drug.3 1 5 Gemcitabine Erlotinib 3 6 Gemcitabine Erlotinib Paclitaxel 6 9 Gemcitabine Erlotinib 8 1
Re: [R] SE from nleqslv
On Tue, Mar 20, 2012 at 4:24 AM, Berend Hasselman wrote: > > > On 20-03-2012, at 01:01, FU-WEN LIANG wrote: > > > Dear R-users, > > > > I use the "nleqslv" function to get parameter estimates by solving a > > system > > of non-linear equations. But I also need standard error for each of > > estima
[R] rtmvtnorm and equal upper and lower truncation boundaries in 'tmvtnorm' package
Dear list, I am facing a problem with the rtmvtnorm function to sample from a truncated multivariate normal when some of the truncation boundaries are equal, e.g.: >rtmvnorm(1, mean = rep(0,3), sigma = diag(3), lower=c(-1,0,-1), upper=c(1,0,1), algorithm="gibbs") Error in checkTmvArgs(m
[R] rJava / RCMD javareconf fails
Hi All, Running R CMD javareconf -e (or R CMD javareconf as root I am rot on my machines) Fails. / [root@penguins1lanalt etc]# R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_30 Java home path : /usr/java/jre1.6.0_30 Java compiler: not present Java headers gen.:
[R] Unique in DataFrame
Hello, I have little doubt, and I do not think that the way I solve the problem is the best way to do it. The following is a small dataset x<-data.frame(city="Barcelona",sales=253639) x<-rbind(x,data.frame(city="Madrid",sales=223455)) x<-rbind(x,data.frame(city="Lisbon",sales=273633)) x<-rb
[R] Graphic legend with mathematical symbol, numeric variable and character variable
2012-03-20
Thread
ECOTIÈRE David (Responsable d'activité) - CETE Est/LRPC de Strasbourg/6 Acoustique
Hi, I'd like to make a legend with a mix of mathematical symbol (tau), numeric variable and character variables.I have tried : types<-c("Type 1","Type 2","Type 2") tau<-c(1,3,2) legend(x="topright",legend=paste(types,"tau=",expression(tau))) but it doesn't work: the 'tau' symbol is not wri
Re: [R] Unexpected input in function
Thank you for your responses. You helped me to see something right in front of me that I should have noticed quickly. I copy/pasted my script from MS Word instead of using a safer text editor. I did catch the funky double-quotes the MS Word uses, but I think it also sometimes substitutes a dash
Re: [R] Loading Dataset into R continual issue
Seems to work for me: x <- read.table("read.table("~/Downloads/gooddemocracy.txt", sep = "\t", header = TRUE) str(x) summary(x)[,1:10] Michael On Mon, Mar 19, 2012 at 5:52 PM, bobo wrote: > Hi, this is related to academic research I am trying to conduct. Please > pardon my lack of socializat
Re: [R] Constraint Linear regression
Due to perfect collinearity, your regression isn't unique so you're not going to be able to even solve the unconstrained version of this problem. Michael On Tue, Mar 20, 2012 at 12:54 AM, priya fernandes wrote: > Hi there, > > I am trying to use linear regression to solve the following equation
Re: [R] Reshaping data from long to wide without a "timevar"
If I understand you right, library(reshape2) dcast(melt(TestData, id.var = "Subject", measure.var = "Drug"), Subject ~ value) Michael On Tue, Mar 20, 2012 at 9:50 AM, Paul Miller wrote: > Hello All, > > I was wondering if it's possible to reshape data from long to wide in R > without using a "
[R] Reshaping data from long to wide without a "timevar"
Hello All, I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order. My
[R] Great new video on BaSTA - Bayesian Survival Trajectory Analysis
Dear all, Fernando Colchero, Owen Jones and Maren Rebke, Max Plank Institute for Demographic Research, present BaSTA -Bayesian Survival Trajectory Analysis. Fernando, Owen and Maren have put together this beautiful video exploring research on ageing and and how to deal with incomplete data. T
[R] cv.glmnet
Hi, all: Does anybody know how to avoid the intercept term in cv.glmnet coefficient? When I say "avoid", it does not mean using coef()[-1] to omit the printout of intercept, it means no intercept at all when doing the analysis. Thanks. [[alternative HTML version deleted]] __
Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()
Case solved. Thanks a lot Peter! Dominic C. -Message d'origine- De : peter dalgaard [mailto:pda...@gmail.com] Envoyé : 20 mars 2012 07:57 À : Dominic Comtois Cc : r-help@r-project.org help Objet : Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict() [Oop
Re: [R] Coalesce function in BBmisc, emoa, and microbenchmark packages
The key is that "Reduce" function -- it takes in a list of elements and combines them iteratively, e.g., `+` is only defined for two elements (at a time) but we can do something like Reduce(`+`, list(1,2,3)) = Reduce(`+`, list(1+2,3)) = Reduce(`+`, list(3,3)) = 3 + 3 = 6 Michael On Tue, Mar 20
Re: [R] Wrong output due to what I think might be a data type issue (zoo read in problem)
On Tue, Mar 20, 2012 at 1:24 AM, knavero wrote: > found a temporary fix (I'm sure it's redundant and not as elegant, but here > it is): > > require(zoo) > require(chron) > setwd("/home/knavero/Desktop/") > > fmt = "%m/%d/%Y %H:%M" > tail1 = function(x) tail(x, 1) > rawData = read.zoo("weatherData.
Re: [R] Coalesce function in BBmisc, emoa, and microbenchmark packages
Hi Brian, This works very well. Still trying to develop some skill with R. So can't say I understand your function completely as yet, but will work on it. I had thought that your function might only work for two columns (because of the "function(x,y)" part), but the example below suggests it wi
Re: [R] glm: getting the confidence interval for an Odds Ratio, when using predict()
[Oops, forgot cc. to list] On Mar 20, 2012, at 04:40 , Dominic Comtois wrote: > I apologize for the errors in the previous code. Here is a reworked example. > It works, but I suspect problems in the se calculation. I changed, from the > 1st prediction to the 2nd only one covariate, so that the
Re: [R] Fitting loglinear model with glm() and loglm()
Dear Christofer, loglm uses an iterative proportional scaling (IPS) algorithm for fitting a log-linear model to a contingency table. glm uses an iteratively reweighted least squares algorithm. The result from IPS is exact. Regards Søren -Oprindelig meddelelse- Fra: r-help-boun...@r-
[R] Predicting confidence intervals for fitted values for non-linear regression
Hello, I am interested in calculating the confidence intervals for fitted values for non-linear regressions. For instance, I have used the nlme package to generate my non-linear model. summary(lme(myvariable~age+age.sq+age.cu, data=my.matrix, random=~1|Name)) I would like to use the model gene
Re: [R] Wrong output due to what I think might be a data type issue (zoo read in problem)
update temporary fix: http://pastebin.com/dzj0W89H -- View this message in context: http://r.789695.n4.nabble.com/Wrong-output-due-to-what-I-think-might-be-a-data-type-issue-zoo-read-in-problem-tp4487682p4488179.html Sent from the R help mailing list archive at Nabble.com. _
[R] Question abou pROC package
How can I implement multiple testing with Bonferroni correction of ROC curve in R?? -- View this message in context: http://r.789695.n4.nabble.com/Question-abou-pROC-package-tp4488271p4488271.html Sent from the R help mailing list archive at Nabble.com.
Re: [R] R crashes due to stats.dll
Dnia 2012-03-18 01:15, Ted Stankowich pisze: Hello! I've been running a looped AIC analysis using several modules including ape, nlme, and MuMIn, and during one particularly long analysis, R (ver 2.14.12) crashes several minutes into the routine with the simple message "R for windows GUI front-
Re: [R] Wrong output due to what I think might be a data type issue (zoo read in problem)
On Mon, Mar 19, 2012 at 11:34 PM, knavero wrote: > Here's the small scale version of the R script: > > http://pastebin.com/sEYKv2Vv > > Here's the file that I'm reading in: > > http://r.789695.n4.nabble.com/file/n4487682/weatherData.txt weatherData.txt > > I apologize for the length of the data. I
Re: [R] Adding columns to csvs in a loop
for (i in fileList){ x <- read.csv(i) x$QID <- "" x$COMMENTS <- "" x$"DATE CREATED" <- "" write.csv(x, file = i) } Sent from my iPad On Mar 19, 2012, at 17:42, Edgar Alminar wrote: > Hello, > I am trying to add columns to a folder of csvs (the folder is called > "20120314"). > I hav
Re: [R] Fitting loglinear model with glm() and loglm()
On Tue, 20 Mar 2012, Christofer Bogaso wrote: Dear all, I have small difficulty in comprehending the loglinear model with R. Assume, we have following data dat <- array(c(911, 44, 538, 456, 3, 2, 43, 279), c(2, 2, 2)) Now I fit a loglinear model with this and get the fitted values: library(MA
[R] Fitting loglinear model with glm() and loglm()
Dear all, I have small difficulty in comprehending the loglinear model with R. Assume, we have following data dat <- array(c(911, 44, 538, 456, 3, 2, 43, 279), c(2, 2, 2)) Now I fit a loglinear model with this and get the fitted values: library(MASS) Model_1 <- loglm(~1 + 2 + 3, dat) fitted(Mode
Re: [R] R (Bold font) and Latex
Or, with a little less typing: <>= x<-c(1,0,2,4) @ x\\ \begin{textbf} \Sexpr{x[1]}\\ \Sexpr{x[2]}\\ \Sexpr{x[3]}\\ \Sexpr{x[4]}\\ \end{textbf} On Tuesday 20 March 2012 10:14:38 Rainer Schuermann wrote: > For a small number of elements you could use \Sexpr{}, > i.e. > > <>= > x<-c(1,0,2,4) > @
Re: [R] SE from nleqslv
On 20-03-2012, at 01:01, FU-WEN LIANG wrote: > Dear R-users, > > I use the "nleqslv" function to get parameter estimates by solving a system > of non-linear equations. But I also need standard error for each of > estimates. I checked the nleqslv manual but it didn't mention about SE. > Is there
Re: [R] R (Bold font) and Latex
For a small number of elements you could use \Sexpr{}, i.e. <>= x<-c(1,0,2,4) @ x\\ \textbf{\Sexpr{x[1]}}\\ \textbf{\Sexpr{x[2]}}\\ \textbf{\Sexpr{x[3]}}\\ \textbf{\Sexpr{x[4]}}\\ Rgds, Rainer On Monday 19 March 2012 20:03:47 Manish Gupta wrote: > Hi, > > I am using R and latex for generating
Re: [R] Automaticall adjust axis scales
Alaios wrote: > Dear all, > > I have made a function that given a number of list elements plot them to the same window. > > The first element is plotted by using plot and all the rest are plotted under the > > same window by using lines. > > I have below a small and simple reproducible example
Re: [R] Wrong output due to what I think might be a data type issue (zoo read in problem)
found a temporary fix (I'm sure it's redundant and not as elegant, but here it is): require(zoo) require(chron) setwd("/home/knavero/Desktop/") fmt = "%m/%d/%Y %H:%M" tail1 = function(x) tail(x, 1) rawData = read.zoo("weatherData.txt", header = T, FUN = as.chron, format = fmt, sep = "\t", aggr
[R] how to find order of the autoregressive process in r
if i have time series,the give me code example for finding auto-regressive process -- View this message in context: http://r.789695.n4.nabble.com/how-to-find-order-of-the-autoregressive-process-in-r-tp4487721p4487721.html Sent from the R help mailing list archive at Nabble.com.
Re: [R] Reshape from long to wide
Another approach, as your needs are very specific (take every other item in the second column and the unique values of columns 1) would be to index, use unique and put it together with data.frame (or cbind). data.frame(family = unique(x[, 1]), kid1 = x[c(T, F), 2], kid2 = x[c(F, T), 2]) Cheers
[R] Wrong output due to what I think might be a data type issue (zoo read in problem)
Here's the small scale version of the R script: http://pastebin.com/sEYKv2Vv Here's the file that I'm reading in: http://r.789695.n4.nabble.com/file/n4487682/weatherData.txt weatherData.txt I apologize for the length of the data. I tried to cut it down to 12 lines, however, it wasn't reproduci
[R] Constraint Linear regression
Hi there, I am trying to use linear regression to solve the following equation - y <- c(0.2525, 0.3448, 0.2358, 0.3696, 0.2708, 0.1667, 0.2941, 0.2333, 0.1500, 0.3077, 0.3462, 0.1667, 0.2500, 0.3214, 0.1364) x2 <- c(0.368, 0.537, 0.379, 0.472, 0.401, 0.361, 0.644, 0.444, 0.440, 0.676, 0.679, 0.62