similar to: Assigning factor names to interaction plot

Displaying 20 results from an estimated 700 matches similar to: "Assigning factor names to interaction plot"

2007 Dec 04
2
Learning to do randomized block design analysis
We just studied randomized block design analysis in my statistics class, and I'm trying to learn how to do them in R. I'm trying to duplicate a case study example from my textbook [1]: > # Case Study 13.2.1, page 778 > cd <- c(8, 11, 9, 16, 24) > dp <- c(2, 1, 12, 11, 19) > lm <- c(-2, 0, 6, 2, 11) > table <- data.frame(Block=LETTERS[1:5], "Score
2007 Jun 15
1
complex contrasts and logistic regression
Hi, I am doing a retrospective analysis on a cohort from a designed trial, and I am fitting the model fit<-glmD(survived ~ Covariate*Therapy + confounder,myDat,X=TRUE, Y=TRUE, family=binomial()) My covariate has three levels ("A","B" and "C") and therapy has two (treated and control), confounder is a continuous variable. Also patients were randomized to
2013 Feb 13
2
NA/NaN/Inf in foreign function call (arg 6) error from coxph function
Dear R-helpers: I am trying to fit a multivariate Cox proportional hazards model, modelling survival outcome as a function of treatment and receptor status. The data look like below: # structure of the data str(sample.data) List of 4 $ survobj : Surv [1:129, 1:2] 0.8925+ 1.8836+ 2.1191+ 5.3744+ 1.6099+ 5.2567 0.2081+ 0.2108+ 0.2683+ 0.4873+ ... ..- attr(*, "dimnames")=List of 2
2010 Oct 15
1
Downloading file with lapply
I'm still getting familiar with lapply I have this date sequence x <- seq(as.Date("01-Jan-2010",format="%d-%b-%Y"), Sys.Date(), by=1) #to generate series of dates I want to apply the function for all values of x . so I use lapply (Still a newbie!) I wrote this test function pFun <- function (x) { print(paste("This is: ",x,sep="")) } When I
2012 Dec 12
1
ggplot: geom_line with only pairs of points connected
Dear list, I've been using plotmeans {gplots} a lot before, and found the "connect" argument to be quite useful. I've moved to ggplot for several reasons, but would still like to connect lines conditionally, somehow. Is it possible to do? Small example: df <- data.frame(cat=LETTERS[1:4],num=rnorm(4)) ggplot(df, aes(x=cat, y=num)) + geom_point() +
2006 May 30
1
rake db_schema_import on vanilla schema.rb
Hi all, I dumped my schema from SQLServer 2000 without any problems. I then tried to "rake db_schema_import" on MySQL 4. To do this i changed my database.yml settings to use the mysql adapter (as it was set to use sqlsever before) and attempted the import. I haven''t changed a thing in the schema.rb script and, even though I do have generated a migration, I think I
2012 Feb 24
1
code for mixed model in R?
Dear I am analysing my data wit a mixed model. I used SAS but I want to redo the same analysis in R. Here the SAS code and what I wrote in R. It seems to work but the results are not the same. I don't know how to specify the class variable in R or specify the variance matrix. Can you please help me? Thanks Jurgen ## SAS: proc glimmix data=trend method=RSPL; class pid; model mdrfinal
2009 Mar 03
2
preparing data for barplot()
What is the best way to produce a barplot from my data? I would like the barplot to show each person with the values stacked val1+val2+val3, so there is one bar for each person When I use barplot(data.matrix(realdata)), it shows one bar for each value instead. To post here, I created an artificical data set, but it works fine. fakedata <- as.data.frame(list(LETTERS[1:3])) colnames(fakedata)
2010 Dec 07
1
please show me simple example how to plot "Distance-Weighted Least Squares" fitting
I got simple x,y pairs of data and simple scatterplot and just cannot figure how to do it , there are many examples but always there is error popping out please show me an example stripped with additional data just core of what I need to do to get this damn line -- View this message in context:
2011 Dec 23
1
Help transforming a dist
I'd like to convert a dist into a table/matrix/thingy of the form: A B value A C value B C value (assuming the dist was over 3 names). Is there a way to do this without using a for loop? -- Taral <taralx at gmail.com> "Please let me know if there's any further trouble I can give you." ? ? -- Unknown
2013 Jun 28
2
Puppet user running Apache-Passenger ?
Is there anything in the Puppet/Passenger setup process that edits httpd.conf and sets the User/Group running apache to "puppet" ? A master I set up several months ago is configured that way. I do not recall doing it. But then the high voltage electroshock therapy does have its side effects :) “Sometimes I think the surest sign that intelligent life exists elsewhere in the
2006 Jan 02
3
ANN: new rails site/RoR praise
Hi, >From idea to launch in less than 48 hours (those 48 hours including the new year party ;) , rails once again showed its effectiveness. Last friday I read the news about a guy who sold a million pixels for 1$ each on his homepage. After slamming my head during half an hour for not having thought of it [1], I thought I''d better spend some time on a rails project, and more as a
2004 Mar 06
2
normal scores test
Hello, I need help in performing a Van_der_Waerden normal scores test in R. I have two arrays of scores(final on therapy scores from drug and placebo) and want to use the normal scores procdeure to test for significance. (observations are unequal in number - due to dropouts). Could you please help me out with the coding or let me know if there is a package that can be used (for example,
2012 Dec 07
2
Converting character to numeric: Error: (list) object cannot be coerced to type 'double'
Dear R users, I am facing a pretty a unusual problem while converting character to numeric. Any input would be appreciated. Below is the code and error faced: --------------------------------------- *> str(cmie.dts)* *'data.frame': 4397 obs. of 1 variable:* * $ INE001A01036: chr "1482181740.000000" "1482181740.000000" "1482181740.000000"
2012 Dec 11
1
converting manual command to loop command
Dear useRs, i have certain commands for some operations in R. They are good if you have a small dataset but my dataset, apart from what i used in the recent past, is prety large. I want to convert these massive sets of commands into a simple loop. Your help is required on it thanks in advance eliza kindly note: "e" is matrix whose each column has to be executed into a distance vector
2008 Dec 04
1
Changing 'record' option in open graphics device
Hi, I am wondering if there is a way to change the value of the "record" option in a graphics device that is already open (and accepts this option). I don''t want to open a new device with, for example "dev.new(record=T)", but just want to change the settings of the current device. This can be done by pointing and clicking on the "history" tab of a
2012 May 21
1
Complex text parsing task
Hello Everyone, I have what I think is a complex text parsing task. I've provided some sample data below. There's a relatively simple version of the coding that needs to be done and a more complex version. If someone could help me out with either version, I'd greatly appreciate it. Here are my sample data. haveData <- structure(list(profile_key = structure(c(1L, 1L, 2L, 2L, 2L,
2012 Oct 13
2
Function hatTrace in package lme4
Dear all, For a project I need to calculate the conditional AIC of a mixed effects model. Luckily, I found a reference in the R help forum for a function to be used: CAIC <- function(model) { sigma <- attr(VarCorr(model), 'sc') observed <- attr(model, 'y') predicted <- fitted(model) cond.loglik <- sum(dnorm(observed,
2012 Feb 17
5
How to change the order of columns in a data frame?
Dear all, I have a data frame in which the columns need to be ordered. The first column X is at the right position, but the remaining columns X1-Xn should be ordered like this: X1, X2, X3 etc instead of like below. > colnames(pos1) [1] "X" "X1" "X10" "X11" "X12" "X13" "X14" "X15" "X16"
2009 Jul 23
4
remove multiple columns by name from dataframe
Hi there, I'm trying to remove multiple columns by name from a data.frame. As a result I need to get back the modified data.frame without the removed columns. My columns I want to delete are listed in a vector called "delete". data <- read.csv2("data.csv") delete <- c("col1", "col2", "col3") newData <- subset(data, select =