similar to: change the class of an object within with()

Displaying 20 results from an estimated 20000 matches similar to: "change the class of an object within with()"

2006 Mar 20
2
Special characters: plus/minus - a method that works
Dear R-people: François Michonneau's method to obtain the special character plus/minus works on Windows 2000 professional. Many Thanks to François for his work! Phil Smith Centers for Disease Control and Prevention Atlanta, GA _____ From: François MICHONNEAU [mailto:francois.michonneau@gmail.com] Sent: Monday, March 20, 2006 1:58 PM To: r-help@stat.math.ethz.ch; Smith, Phil
2013 Jan 13
2
Regarding the recent changes to @<-
Hello all, In one of the packages (phylobase) I'm contributing to, we define a class as follows: setClass("phylo4", representation(edge = "matrix", edge.length = "numeric", label = "character", edge.label = "character", order =
2006 Mar 16
2
hierarchical partitioning
Hello, I would like to know what it means, when the hier.part's output has a data frame of a negative independent contribution for variables (?IJ) and how this can be caused. Thank you very much. Yours sincerely M. Heuner
2005 Jun 02
3
How to change all name of variables
Dear R-helpers, First I apologize if my question is quite simple I have a large datasets which more 100 variables. For a research I need to change all name of variables with add one or more letters on each variables. For example, > data(Pima.tr) > Pima.tr[1:5,] npreg glu bp skin bmi ped age type 1 5 86 68 28 30.2 0.364 24 No 2 7 195 70 33 25.1 0.163 55 Yes 3 5
2004 Oct 21
2
an introduction to R in french
Hello wizaRds ! I am looking for a french and recent version of "An introduction to R". Does anybody know where i could find on of these. Thanks. -- Romain Fran??ois 25, avenue Guy Moquet 94 400 Vitry sur seine FRANCE _______________________ _______________________ francoisromain at free.fr 01 46 80 65 60 06 18 39 14 69
2006 Mar 15
2
create a list of vectors
Hello. I want to create a list of vectors but each component of the list has a different length. For example: Example=list() Example=list(Example,c(1,2,3)) Example=list(Example,c(11,12,13,14,15)) If I want the first component of the Example list, I have to write: Example[[1]][[2]]. R responses 1 2 3 The second component: Example[[2]]: 11 12 13 14 15 If I iterate the previous example,
2005 Sep 14
4
How to drag/drop visitable anchors ?
Hi ! I have the following: <li id="photo_<%= @photo.id %>" class="photo"> <%= link_to(image_tag(url_for_file_column(:photo, :picture)), {:action => ''photo'', :id => @photo}, {:title => @photo.description}) %> </li> <script type="text/javascript" language="JavaScript"><!--
2005 Nov 29
2
permutation test for linear models with continuous covariates
Hi I was wondering if there is a permutation test available in R for linear models with continuous dependent covariates. I want to do a test like the one shown here. bmi<-rnorm(100,25) x<-c(rep(0,75),rep(1,25)) y<-rnorm(100)+bmi^(1/2)+rnorm(100,2)*x+bmi*x H0<-lm(y~1+x+bmi) H1<-lm(y~1+x+bmi+x*bmi) anova(H0,H1) summary(lm(y~1+x+bmi)) But I want to use permutation testing to
2011 Oct 06
1
error messages
Im doing a project using Rcommander. I have a dataset with 5 variables, BMI being one of them. I would like to find the variance, standard deviation, range, median, etc of BMI. However, everytime I type a command into the script window, (such as var(BMI$BMI,na.rm=TRUE) )an error message pops up saying Object "BMI" not found. I can graph it, work it, do t-test, etc,. It's listed as
2012 Oct 27
2
Class generator functions for reference classes
As of rev. 61035 in r-devel, setRefClass() now returns a generator function, as setClass() has done since 2.15.0. The convenient style is now: mEdit <- setRefClass("mEdit",......) xx <- mEdit(data = xMat) instead of xx <- mEdit$new(data = xMat) The returned object still has fields and methods accessible as before. See the "Value" and "Reference Class
2008 Mar 17
1
Std errors in glm models w/ and w/o intercept
I am doing a reanalysis of results that have previously been published. My hope was to demonstrate the value of adoption of more modern regression methods in preference to the traditional approach of univariate stratification. I have encountered a puzzle regarding differences between I thought would be two equivalent analyses. Using a single factor, I compare poisson models with and without
2011 Jan 23
2
Creating subsets of a matrix
Hello, Say I have 2 columns, bmi and gender, the first being all the values and the second being male or female. How would I subset this into males only and females only? I have searched these fora and read endlessly about select[] and split() functions but to no avail. Also the table is not ordered. bmi gender -> bmi gender + bmi gender 1 24.78 male
2015 Aug 02
3
ayuda con análisis de supervivencia
Hola a todos, -Estoy estudiando el efecto de dos genotipos (~tratamientos) en la aparición de síndrome metabólico (MetS) con datos longitudinales recogidos a tiempo 0,7,10,15,20 y 25 años. -He hecho un dataframe con las siguientes variables MetS: Síndrome Metabólico (Si=1,No=0) bmi: Indice de masa corporal (IMC) cuando se produce la conversión a MetS+ . Para los que permancen MetS-, esta variable
2009 May 15
2
help with as.numeric
hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi <- (weight)/((height/100)^2) but it comes up with the error: Warning messages: 1: In Ops.factor(height, 100) : / not meaningful for factors 2: In Ops.factor((weight),
2006 Aug 03
2
run self written functions
Hello, I'm not sure if I'm in the right place with my question... I'm running R on Windows and wrote a function and saved it as .R file. It looks like this: bmi <- function(weight, height) { bmi <- weight / height^2 bmi } If I want to use this function, I have to mark everything and then press Ctrl-R. But then everything single line is executed on the command line,
2008 Jan 01
3
if statement problem
Hi All, I have a small dataset named das (43 cases) in which I am trying to create a binary outcome (1/0) based on the following code: if (das$age>65 && das$bmi>30) {das$danger<-1} else das$danger<-0 I am setting a flag called 'danger' to 1 of the subject is over 65 and has a BMI > 30. I find that my statement evaluates the first record in the data.frame and
2008 Oct 22
1
getting the "name" of an object
Hello, I'm looking for a way to get the "name" of an object when it is used within an "sapply". More precisely, with a simple example : I have a named list of objects : myList = list(a=rnorm(10),b=rnorm(10),c=rnorm(10)) I would like to create a new object from each of the components of myList using the "sapply" function, for example to get the mean of all
2007 Oct 09
23
Testing layouts with RSpec on Rails
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it''s plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn''t catch that) Thanks, Matt -- Matt Patterson | Design & Code <matt at reprocessed org> | http://www.reprocessed.org/
2012 Jan 26
2
How do I use the cut function to assign specific cut points?
I am new to R, and I am trying to cut a continuous variable BMI into different categories and can't figure out how to use it. I would like to cut it into four groups: <20, 20-25, 25-30 and >= 30. I am having difficulty figuring the code for <20 and >=30? Please help. Thank you. -- View this message in context:
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts, I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ? Here is the reproducible example. ############################# install.packages( "quantreg" ) library(quantreg) crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67) bmi