similar to: plotting from dataframes

Displaying 20 results from an estimated 1000 matches similar to: "plotting from dataframes"

2008 Jul 31
2
S 3 generic method consistency warning please help
I would like to include this in a package. The S3 methods on R CMD check says * checking S3 generic/method consistency ... WARNING window: function(x, ...) window.chron: function(data, day1, hour1, day2, hour2, ...) See section 'Generic functions and methods' of the 'Writing R Extensions' manual. I have looked and can not figure it out. This function is for convience. What
2012 Jan 19
1
converting a for loop into a foreach loop
Dear all, Just wondering if someone could help me out converting my code from a for() loop into a foreach() loop or using one of the apply() function. I have a very large dataset and so I'm hoping to make use of a parallel backend to speed up the processing time. I'm having trouble getting selecting three variables in the dataset to use in the foreach() loops. My for() loop code is:
2011 Jun 14
2
Off-topic: (Simple?) Random Sampling when n is a random variable
Hi everyone, I'm involved in a discussion with a colleague. He suggested a sample design for a finite-sized process that (to all intents and purposes) involves tossing a coin and examining the unit if the coin shows Heads. I should emphasize that we're both approaching the problem from a design-based sampling theory point of view. So I have no argument about the appropriateness of the
2001 Oct 26
3
question about anova() output
Hello, I am getting output from anova() and summary(aov()) that depends on the order of the factors in the fitted model object, and this has me baffled. I see this dependency with the data.frame below but not with an example (table 6.4) from Montgomery's DOE book. This is with R 1.3.0 on Debian GNU-Linux. Where have I gone wrong? > centerpts run sample CH50mg 1 day1 dev126 0.56 2
2013 Jan 17
2
Explore patterns with GAM
Dear all, I new to r and I would like your help. I want to explore the patterns (unimodal, monotonically increased/decreased) of species richness~altitude using GAM in R. Although I run the gam function in mgcv package I do not know how to manually define knots and degrees of freedom. Any help would be greatly appreciated. Spyros -- View this message in context:
2013 Feb 04
1
How to obtain the model/equation at each level automatically in a regression model with a few factors
I am wondering how to obtain the model/equation at each level automatically in a regression model with a few factors without looking at summary of the lm model. For example, consider lm.factors <- lm(y ~ x1 + factor(x2)*factor(x3)+x4*factor(x5)) The coefficients of lm.factors in summary(lm.factors) might be complicated. I would like to have the equation at each level from lm.factor. Could you
2013 Jan 15
1
Random Forest Error for Factor to Character column
Hi, Can someone please offer me some guidance? I imported some data. One of the columns called "JOBTITLE" when imported was imported as a factor column with 416 levels. I subset the data in such a way that only 4 levels have data in "JOBTITLE" and tried running randomForest but it complained about "JOBTITLE" having more than 32 categories. I know that is the limit
2006 Sep 14
2
ANOVA in R
Despite having used R on a daily basis for the past two years, I'm encountering some difficulty performing an ANOVA on my data. What I'm trying to do is the following: Given data such as: Day 1 Day 4 Day 8 2 7 2 3 2 8 3 4 7 6 6 8 1 3 4 I want to use ANOVA to determine
2013 Jan 17
2
create block diagonal with each rows
Dear R users, I'd like to create a block diagonal matrix with each rows in a matrix. Here is a simple example. (In fact, the matrix is big) x <- matrix(1:20, 4,5) > x [,1] [,2] [,3] [,4] [,5] [1,] 1 5 9 13 17 [2,] 2 6 10 14 18 [3,] 3 7 11 15 19 [4,] 4 8 12 16 20 With each rows in matrix x, I'd like to make the matrix below.
2009 Jan 21
1
finding row and column indices of date in multiple columns of a data frame
Hi, I have a data.frame SAMPLES with columns: Site Site# Season Day1 Day2 Day3 Day1, Day2, Day3 are class "Date", the other columns are numeric or factor. I have a date "mydate" that may or may not be listed in my data.frame and I need to find that out. If "mydate" is there, I want to get the number of the data.frame row where it occurs.
2007 Apr 19
4
general question about plotting multiple regression results
Hi all, I have been bumbling around with r for years now and still havent come up with a solution for plotting reliable graphs of relationships from a linear regression. Here is an example illustrating my problem 1.I do a linear regression as follows summary(lm(n.day13~n.day1+ffemale.yell+fmale.yell+fmale.chroma,data=surv)) which gives some nice sig. results Coefficients:
2010 Apr 21
2
Table to List Transformation Scenario
I have a series of tables, one for each environment indicating a date (row) and a sample at each hour of the day (0 to 23) Test1 Table: Date,Hour1,Hour2,...Hour23 1/1/10,123,123,...,123 I would like to model this as a time series but how can I translate the table into a list such that I can get: 1/1/10 00:00, 123 1/1/10 01:00, 123 1/1/10 02:00, 123 ... 1/1/10 23:00, 123 Any suggestions on how
2015 Oct 05
3
authorship and citation
Dear R developers, This is a rather peculiar question, but nevertheless I would still need an answer for. It is about an R package which I created (namely QCA), and from versions 1.0-0 to 1.1-4 I had a co-author. The co-author recently withdrawn from the package development, but still requires to be left in the authors list and be cited for the package in the CITATION file. Obviously, one could
2009 Sep 11
1
help with plotting
HI all, raw_urine = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\mz.spot.sam.dat.new", header = TRUE ) pvalue = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result", header = TRUE ) library(compositions) p = function(a,b){ y = pvalue[,a] if(y<0.01){ index = which(y, arr.ind=TRUE) day1 = raw_urine[index,3:7] day2 =
2013 Feb 04
6
Script for conditional sums of vectors
Hi guys, I hope you can help me with this (probably) simple query: I have a data frame: -------------------------- a=c(1,1,1,1,1,1,2,2,2,2,2,2) b=c(1,1,1,2,3,4,1,1,2,2,3,4) c=c(400,200,300,100,500,300,200,100,500,400,200,100) data=data.frame(a=a,b=b,c=c) -------------------------- And I would like to get the following output: -------------------------- b a 1 2 3 4 1 900 100 500 300 2
2011 Apr 28
1
Undefined columns selected
This is part of my program. I am getting an error, that I cannot figure out, any help would very much appreciated, thanks. # subset variables arc <- arc[,c("SNAP", "code", "ncode", "var", "n_total")] Error in `[.data.frame`(arc, , c("SNAP", "code", "ncode", : undefined columns selected arc$N_eff <-
2011 May 02
1
Optimization - n dimension matrix
Dear all, I am facing the following problem in optimization: w = (d, o1, ..., op, m1, ..., mq) is a 1 + p + q vector I want to determine: w = argmin (a - d(w))' A (a - d(w)) where a is a 1xK marix, A is the covariance matrix of vector a, d(w) is a 1xK vector which parameters are functions of parameters d, o1 .. op, m1 .. mq. Is there some function to solve this problem easily? I know
2011 May 02
1
UNIX-like "cut" command in R
The R "cut" command is entirely different from the UNIX "cut" command. The latter retains selected fields in a line of text. I can do that kind of manipulation using sub() or gsub(), but it is tedious. I assume there is an R function that will do this, but I don't know its name. Can you tell me? I'm also guessing that there is a web page somewhere that will tell
2011 May 04
1
problem with package "adapt" for R in Mac
Hi, How i can install the package "adapt" in some version of R for mac? i try in 2.13, 2.9,2.7 and other previous versions... and nothing happens. and another question: There are some packages that do the same but that it is implemented for mac? (calculate integrals in 2 or more dimmensions). help me please, it's for an important work. greetings. -- Matías Hernán Ramírez
2011 May 05
1
functions pandit and treebase in the package apTreeshape
Hello. I'm trying to use the functions pandit and treebase. They are in the package apTreeshape. Once I've loaded the package, R responses: - no function pandit/treebase. Somebody knows why or what is the reason? Thanks, Arnau. ------------------------------------------------------------ Arnau Mir Torres Edifici A. Turmeda Campus UIB Ctra. Valldemossa, km. 7,5 07122 Palma de Mca.