similar to: the first name of the first column

Displaying 20 results from an estimated 3000 matches similar to: "the first name of the first column"

2013 Apr 12
3
Why copying columns of a data.frame becomes numeric?
Dear list, I want the 1st, 2nd, 5th, and 6th columns of mtcars. After copying them, the columns become numeric class rather than data frame. But, when I copy rows, they data frame retains its class. Why is this? I don't see why copying rows vs columns is so different. > class(mtcars) [1] "data.frame" > head(mtcars) mpg cyl disp hp drat wt qsec vs
2013 Apr 16
2
efficiently diff two data frames
Dear all, What is the quickest and most efficient way to diff two data frames, so as to obtain a vector of indices (or logical) for rows/columns that differ in the two data frames? For example, > Xe <- head(mtcars) > Xf <- head(mtcars) > Xf[2:4,3:5] <- 55 > all.equal(Xe, Xf) [1] "Component 3: Mean relative difference: 0.6863118" [2] "Component 4: Mean relative
2017 Jun 01
3
odfWeave - A loop of the "same" data
Before I go and do this another way - can I check if anyone has a way of looping through data in odfWeave (or possibly sweave) to do a repeating analysis on subsets of data? For simplicity lets use mtcars dataset in R to explain. Dataset looks like this: > mtcars mpg cyl disp hp drat wt ... Mazda RX4 21.0 6 160 110 3.90 2.62 ... Mazda RX4 Wag 21.0 6 160 110 3.90
2017 Jun 01
0
odfWeave - A loop of the "same" data
On Thu, 1 Jun 2017, POLWART, Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST) via R-help wrote: > Before I go and do this another way - can I check if anyone has a way of > looping through data in odfWeave (or possibly sweave) to do a repeating > analysis on subsets of data? > > For simplicity lets use mtcars dataset in R to explain. Dataset looks like this: >
2003 Aug 07
1
graph for selected lines in stars()
Dear listers, The following command (derived from the example in the ?stars help page) works : data(mtcars) stars(mtcars[, 1:7]) But the following gives an error: stars(mtcars[1, 1:7]) Error in s.y[i, ] : incorrect number of dimensions I was expecting to have the star graph for the first line (Mazda Rx4) The following give an incorrect graph for the first two cars : stars(mtcars[1:2, 1:7])
2007 Jun 05
3
read table
Hi, I'm a novice of R. I want to read the following table into R: names mpg cyl disp hp drat Mazda RX4 21.0 6 160.0 110 3.90 Mazda RX4 Wag 21.0 6 160.0 110 3.90 The command I used is: > test <- read.table(file.choose(),header=T) The result is: Error in read.table(file.choose(), header = T) : more columns than column names
2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help This is a follow-up to my previous post here: http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c I am working on developing an open-source automated system for running batch-regressions on very large datasets. In my previous post, I posed the question of obtaining VIF's from the output of
2003 Jul 22
1
Conditional Statements for Graphing
Dear List I have math test scores for male and female students where gender is a dummy code (female =1). I also have a variety of other demographic variables. However to begin, I want to create a very simple stripchart where female math scores are a blue circle and male scores are a red triangle. I am having difficulty using conditional statements to accomplish this. Thank you. ------
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the console) the function arguments in the call stack are exploded out to their actual values,
2018 Feb 12
2
plotting the regression coefficients
Hi Petr and Richard; Thanks for your responses and supports. I just faced a different problem. I have the following R codes and work well. p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta), colour=factor(sign(Beta)))) + theme(axis.text=element_text(size = 5)) p1<-p+geom_point() p2<-p1+theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
2018 Feb 12
3
plotting the regression coefficients
Hi After melt you can change levels of your factor variable. Again with the toy example. > levels(temp$variable) [1] "y1" "y2" "y3" "y4" > levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)] > levels(temp$variable) [1] "y2" "y4" "y1" "y3" > And you will get graphs with this new levels ordering.
2018 May 10
0
the first name of the first column
1. My name is Bert, not Brent; 2. I am not your private consultant -- always cc the list unless you have good reason not to. I have done that here. It looks like this is what you want; if so, you really need to go through an R tutorial or two to learn the basics: d <- structure(list(region = structure(c(1L, 1L, 1L, 1L), .Label = "zilan", class = "factor"), Fe_ppmtp =
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response. tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right tmp[order(tmp$m),] tmp <- data.frame(m=factor(letters[1:4]), n=1:4) levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),] changing levels
2018 Feb 13
0
plotting the regression coefficients
Hi scale_colour_gradient(?red?, ?blue?) should do the trick. Actually I found it by Google ggplot colour http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/ http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots question. So you could find it too and probably far more quickly then myself as I have also other duties. Cheers
2018 Feb 12
0
plotting the regression coefficients
Hi Petr; Thanks so much. This is great! Although last Sunday, alternatively, I have solved the problem using the following statement at the very end of the program. * ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize = F, dpi=300).* This works very well too. Asa my categorical variables are in my Y axis, my R program reorders the names on Y-axis. However, I would
2018 Feb 12
2
plotting the regression coefficients
Hi Maybe there are other ways but I would split data to several chunks e.g. in list and use for cycle to fill multipage pdf. With the toy data something like library(reshape2) library(ggplot2) temp <- melt(temp) temp.s<-split(temp, cut(1:nrow(temp), 2)) pdf("temp.pdf") for (i in 1: length(temp.s)) { p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
2017 Jun 16
2
point size
Hi all; I am running the following ggplot codes. Runs well. However, I need to reflect the numeric values of the log10_P to the point size in the graph. Your help highly appreciated, Regards, Greg p <- ggplot(mydata, aes(x = X, y = log10_P)) + theme_bw() +theme(panel.border=element_blank()) + theme(legend.position="top", axis.text=element_text(size = 8)) (p1 <- p +
2018 May 30
4
par(mfrow=c(3,4)) problem
Hi all; I need to put 12 different plot2 into the same matrix. So my array for the matrix will be par(mfrow=c(3,4)). I am running ggplot2 to produce my 12 plots. For some reason, par(mfrow=c(3,4)) did not turn out 3*4 matrix. my basic R codes for each plot is par(mfrow=c(3,4)) library(ggplot2) p <- ggplot(a, aes(x=Genotypes, y=Plant_hight, size=Plant_hight, color=Showing_rate)) + . . Best
2017 Sep 19
2
remove quotes from matrix
Hi Duncan and Bert; I do appreciate for your replies. I just figured out that after x1= noquotes(x) commend my 733*22 matrix returns into n*1 vector. Is there way to keep this as matrix with the dimension of 733*22? Regards, Greg On Tue, Sep 19, 2017 at 10:04 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 19/09/2017 9:47 AM, greg holly wrote: > >> Hi all;
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks so much. Exactly this is what I need. I will play to change color and so on but this backbound is perfect to me. I do appreciate your help and support. Regards, Greg On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > I copied your values to R, here it is > > > > > dput(temp) > > > > temp <-