similar to: R function data variable name argument

Displaying 20 results from an estimated 300 matches similar to: "R function data variable name argument"

2008 Jul 04
1
Repeated measures lme or anova
Hi As I can't find an example of my data structure I'd like some advice on which is the most appropriate test for significant effects. If I should be using either lme or anova, is the relevant example below the best/correct way to do the test? The Data... 2 groups of patients (5 in GroupA, 7 in GroupB) 3 short acting drugs, (I'm not concerned with residual effects from the previous
2011 Feb 08
1
Just another pattern matching / indexing question
Hi all, thank you for your patience. I am dealing with a large dataset detailing patients and medications Medications are hard to code, as they are (usually) meaningless unless matched with doses. I have a dataframe with vectors (Drug1, Drug2..... Drug 16) and individual patients are represented by rows. The vectors are actually factors, with 100s of possible levels (all the drugs the patient
2012 Nov 29
2
Analysis of Variance
Hi, I am encountering a difficulty I don't understand. Be patient, I'm very new to analysis of variance. If I load this data: example12_7=read.table("http://msemac.redwoods.edu/~darnold/math15/data/chapter12/example12_7.dat",header=TRUE) The run the oneway.test: oneway.test(time~drug,data=example12_7,var.equal=TRUE) I get these results: data: time and drug F = 4.1881, num
2011 Sep 28
1
number of items to replace is not a multiple of replacement length
Please help with this error message drugbook is an 885 x 32 dataframe >names(drugbook) [1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5" [6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10" [11] "DRUG11" "DRUG12"
2007 Jul 05
3
summarizing dataframe at variable/factor levels
All, Is there an efficient way to apply say "mean" or "median" to a dataframe according to say all combinations of two variables in the dataframe? Below is a simple example and the outline of a "manual" solution that will work but is not very efficient (could also generalize this to a function). Searched the archives and docs but didn't see anything close to
2011 Mar 25
4
two plots in qplot
Hello I simply want to plot two variables against one 'year' variable in qplot. Is any way of doing this without reshaping data in long format and using facet function afterwards? Thank you Denis
2011 Jun 10
1
ggplot2 avoid automatic color selection
Hey all, I'm trying to replicate some plots with ggplot2. The problem is that I need to specify the color for every attribute (drug). If I use the code below the colors get automatically assigned but I need to plot drug1 in black drug2 in blue etc. How do I do that? q = qplot(days,vol,data = cellLine7064, color = drug, geom = c("line", "point")) best regards, Immanuel
2013 Feb 17
2
nested random factor using lme produces errors
Hi, I am running a mixed-effect model with a nested-random effect. I am interested in gut parasites in moose. I has three different type of treatment that I applied to moose which are from different "families". My response variable is gut parasites and the factors are moose families which is nested within treatment. My data is balanced. To answer this question, I used the lme function
2007 Jul 03
1
xyplot and autokey, maintaining colors specified via "col" in key
All, When specifying colors to xyplot w/ a groups argument, using auto.key no longer maintains the colors properly. I've searched the docs and help but haven't found exactly what I need ... I saw a few examples in the archives involving par.settings but that doesn't seem to do it. I also saw some people using key instead of auto.key, but that didn't seem consistent. Is there a
2003 Mar 13
0
Repeated measures 2-way anova -- robustness question
I'm a journalist, wondering what questions to ask about a study that contrasted the impact on serum cholesterol of two drugs. This was a 40 dog study: 5 treatment blocks of 4 dogs each, randomized to: a control block, two blocks at different doses of drug1 and two at corresponding doses of drug2. Analysis was 2-factor repeated measures ANOVA on treatment group and sampling time. Linear
2007 Sep 12
1
stastistical test on normalized data
Dear R-maillit, I have to perform a stastistical test to asses if two grug show the same or different effect on my prepartion. I tested on the same preparation only one drug and I have to use normalized data due to high variability in the control condictions. What type can I use? A non paramatric test right? And how can do it on R software? Thanks in advance Simone [[alternative HTML version
2010 Jul 05
3
adding a row of names to data.frame
Relative noob here, I have a data.frame and simply want to add an explicit column of names in column 1 of the form "trial_number01" for row 1, "trial_number02" for row 2 .... etc. It is simply for visual purposes and to explain data to others. I've tried Using row.names and other but still no luck, am sure it has been covered but I can't find it, can you please point
2012 Oct 31
3
expand.grip for permutations
if i were to have a block size of 4 people and i want to assign a treatment combination to the entire block, there would be 16 different treatment combinations (TTTT, TTTP, TTPP, PTTP, etc.) i am trying to get all 16 permutations and i am able to use this code below. drugs=c('P','T'); comb=expand.grid(drugs,drugs,drugs,drugs) for a block size of 3 the code would be
2011 Jun 23
2
Rms package - problems with fit.mult.impute
Hi! Does anyone know how to do the test for goodness of fit of a logistic model (in rms package) after running fit.mult.impute? I am using the rms and Hmisc packages to do a multiple imputation followed by a logistic regression model using lrm. Everything works fine until I try to run the test for goodness of fit: residuals(type=c("gof")) One needs to specify y=T and x=T in the fit. But
2006 May 30
1
max / pmax
Hello R users, I am relatively new to R and cannot seem to crack a coding problem. I am working with substance abuse data, and I have a variable called "primary.drug" which is considered the drug of choice for each subject. I have just a few missing values on that variable. Instead of using a multiple imputation method like chained equations, I would prefer to derive these
2006 May 26
1
multi_search will not work
I am trying to get multi_search to search across multiple models. I have the following: class Drug < ActiveRecord::Base acts_as_ferret :store_class_name => true end class Target < ActiveRecord::Base acts_as_ferret :store_class_name => true end and I am trying to query via: @drugs = Drug.multi_search(params[:query], [Target]) But I get no results. If I go: @drugs =
2013 Feb 17
2
Multidimensional correlation matrix question
Hello, I previously sent this message which was stripped off due to HTML mail. Sorry! Thanks. Hello All, I am new to the list. I have been learning to use R recently and its been great to see so much help available. However I must admit, I have stumbled upon a problem with correlation matrices and was hoping if someone could help. I have an excel workbook with a sheet per drug. Each sheet
2011 May 26
6
Running a wine app from a control panel.
Hello, I wonder if anyone has experienced this, or knows of a way to fix this problem I have. I am trying to host a game server that needs wine to launch. I can run the game fine through an SSH terminal using wine game.exe. I do get this message: Code: Application tried to create a window, but no driver could be loaded. Make sure that your X server is running and that $DISPLAY is set
2013 Sep 04
2
Attribute Length Error when Trying plm Regression
Hello, I am trying to run a fixed effects panel regression on data containing 5 columns and 1,494 rows. I read the data in as follows: >drugsXX<-read.csv(file="C:\\Folder\\vX.X\\Drugs\\drugsXX_panel.csv", head=TRUE, sep=",") Verified it read in correctly and had a good data.frame: >dim(drugsXX) [1] 1494 5 >drugs XX produce expected data with correct column
2011 Apr 22
1
Survival analysis: same subject with multiple treatments and experience multiple events
Hi there, I need some help to figure out what is the proper model in survival analysis for my data. Subjects were randomized to 3 treatments in trial 1, some of them experience the event during the trial; After period of time those subjects were randomized to 3 treatments again in trial 2, but different from what they got in 1st trial, some of them experience the event during the 2nd trial (I