similar to: editor: not possible to change the variable name

Displaying 20 results from an estimated 11000 matches similar to: "editor: not possible to change the variable name"

2011 May 07
4
how to calculate the mean of a group in a table
Hi its me again I don't mean to get on your nerves, but the use of R proofs to be a bit more complicated than envisaged. I would like to calculate the mean of a group of values, here "wage_accepted". The group is determined by the stage and period, so in the end there should be a column with the values of the wages in period 1 stage1, period 1 stage 2, period 2 stage1...
2007 Oct 01
4
how to plot a graph with different pch
I am trying to plot a graph but the points on the graph should be different symbols and colors. It should represent what is in the legend. I tried using the points command but this does not work. Is there another command in R that would allow me to use different symbols and colors for the points? Thank you kindly. data(mtcars) plot(mtcars$wt,mtcars$mpg,xlab= "Weight(lbs/1000)",
2011 Apr 07
3
Correlation Matrix
Listers, I have a question regarding correlation matrices. It is fairly straight forward to build a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is construct a smaller correlation matrix using just three of the variable out of my data set. When I run this: cor(MyDataFrame$variable1,
2009 Dec 08
1
problem with split eating giga-bytes of memory
I'm having trouble using split on a very large data-set with ~1400 levels of the factor to be split. Unfortunately, I can't reproduce it with the simple self-contained example below. As you can see, splitting the artificial dataframe of size ~13MB results in a split dataframe of ~ 144MB, with an increase memory allocation of ~10 fold for the split object. If split scales linearly, then my
2011 May 04
2
select value from a column depending on a value in another column
Hi everybody I couldn't find the solution to what must be quite a simple problem. Maybe you can help? treatment session period stage wage_accepted market 1 1 1 1 1 25 public 2 1 1 1 1 19 privat 3 1 1 1 1 15 public 4 1
2007 Oct 24
3
Partial aggregate on sorted data
Hi All, I'm looking for ways to compute aggregate statistics (with the aggregate function) but with an option for sorting and selecting a subset of the data frame. For example, I have would like to turn this : aggregate(myDataframe$TargetValue,list(SomeFactor = myDataframe$SomeFactor),mean) into something like aggregate(myDataframe$TargetValue,list(SomeFactor =
2010 Mar 11
2
Can't convert list to matrix properly
Hi guys, here is a list of names that I have: MyList: > myList<-list("A", "B","C","D") > myList [[1]] [1] "A" [[2]] [1] "B" [[3]] [1] "C" [[4]] [1] "D" I want to turn this list into a matrix of 1 row and 4 columns with those four components (A, B, C, D) so here is what I do: myDataFrame <-
2010 Apr 26
1
help with code
I am new to R and have tried for a good while to figure out how to code this in R. The dataset below: FTIStandKey State County FTITract CoverType Ver_CT V_Origin V_SpGrp NAH6005-001 Texas Jasper NAH6005 PPLB-2000-U PPLB-2000-U P P NAH6005-002 Texas Jasper NAH6005 NHHX-1950-O NHHX-1950-I N H NAH6253-001 Texas Tyler NAH6253 PPLB-2001-U PPLB-2001-U P P
2012 Jul 19
2
problem with using apply for dataframe
Dear people, I am including an example of a dataframe: mydataframe<-data.frame(X=c(1:4),total_bill=c(16.99,10.34,21.01,23.68),tip=c(1.01,1.66,3.50,3.31),sex=c("Male","Male","Male","Female")) When I use the sapply function getting the information about the factors works: sapply(mydataframe,function(x)is.factor(x)) X total_bill tip
2010 Apr 29
2
understanding behavior of "merge"
I'm trying to bootstrap resample from a repeated measures dataset. I sample a vector of "ID"'s from my dataframe with replacement. Then I merge this back with my dataframe. I'm re-sampling subjects in the dataset rather than rows of the data. I thought I could use the left/right join features of the merge to select the records I want from the dataframe (mydataframe), like
2005 Apr 04
2
mysql retrive question
hello R-Users, I have this simple but not for me question: I do: > res<-dbSendQuery(con, "SELECT * FROM tabellaProva") > myDataFrame<-fetch(res) > myDataMatrix<-as.matrix(myDataFrame[,-1]) > namerows(myDataMatrix)<-as.character(myDataFrame[,1]) and I have: io tu io "0" "1" tu "1" "0" my problem is that the
2012 Jul 04
2
Difference between two-way ANOVA and (two-way) ANCOVA
Hi! as my subject says I am struggling with the different of a two-way ANOVA and a (two-way) ANCOVA. I found the following examples from this webpage: http://www.statmethods.net/stats/anova.html # One Way Anova (Completely Randomized Design) fit <- aov(y ~ A, data=mydataframe) # Randomized Block Design (B is the blocking factor) fit <- aov(y ~ A + B, data=mydataframe) # Two Way
2004 Nov 20
2
subset on data frame
I have a data frame. And I'd like to subset according to rownames. subset(mydataframe, rownames(mydataframe) == myrow, select = mycols) it turned out that "myrow" cannot be a vector. But I have multiple rows to pick. Is there a way to get around this problem?? Thank you for your help!! Lei Jiang Department of Chemsitry University of Washington Box 351700 Seattle, WA 98195
2010 Apr 26
1
Sweave: centering with echo=TRUE
In a .Rnw file I want to insert the R command pairs(mydataframe) and achieve the following effects 1. the command itseld is echoed into the tex document generated by Sweave <<fig=TRUE,echo=TRUE>>= 2. The graphics generated appears in the tex document, with the graphics centred. 3. The R command > pairs(mydataframe) is not centered. Sweave-manual.pdf gives the following code chunk
2007 Apr 22
1
dput/dget when a data frame has 2 rows (PR#9627)
This doesn't seem right; I'm using R version 2.4.1 (2006-12-18) on Mac OS and Win XP and find the same issue: > mydataframe <- data.frame(ppi=c(.5,.5),mmu=c(5,10)) > dput(mydataframe,"mydataframe.txt") > dget("mydataframe.txt") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not
2010 May 15
1
Dataframe to word, using R2wd
Hi All, I'm trying to use R2wd to send a dataframe to Word. The dataframe isn't huge - 300 rows, 12 variables, although it has some long strings in it. Using: wdTable(format(myDataFrame)) or wdTable(myDataFrame) Produces a very complex table, which Word struggles to process and layout. (I can't work out what the table is - it seems to be nested tables. Converting to text gives
2003 Sep 23
3
number of distinct values in a dataframe
Hi R-users, How can I found the number of a distinct values in a data frame (occurrence of distinct values)? The dataframe consists of several thousands integer numbers. Thanks, Rado -- Radoslav Bonk M.S. Dept. of Physical Geography and Geoecology Faculty of Sciences, Comenius University Mlynska Dolina 842 15, Bratislava, SLOVAKIA tel: +421 905 968 127 e-mail: rbonk at host.sk
2005 Jun 15
1
anova.lme error
Hi, I am working with R version 2.1.0, and I seem to have run into what looks like a bug. I get the same error message when I run R on Windows as well as when I run it on Linux. When I call anova to do a LR test from inside a function, I get an error. The same call works outside of a function. It appears to not find the right environment when called from inside a function. I have provided
2005 Feb 08
4
Renaming columns in data.frame, inserting/removing columns from data.frame
Hello, I'm hoping that there is an easier way to rename columns in a data frame other than by using the names() assignment, which requires you to type in all the column names at once for a data.frame, in the case that I simply want to rename a single column in a data frame. Also, is there an easy way to move columns in a data frame around relative to the other columns? Thanks in
2007 Jan 11
2
Wishlist: Sweave: allow line breaks after forward slashes (PR#9443)
Full_Name: Arne Henningsen Version: 2.4.0 OS: Linux Submission from: (NULL) (134.245.140.242) Sweave does not allow line breaks after forward slashes ("/"). This might lead to a long "substring" of a command that cannot be wrapped. Hence, Sweave either keeps this long "substring" in the current line and produces a too long line or it moves the entire