Displaying 20 results from an estimated 4000 matches similar to: "Logical vectors"
2018 Jan 17
0
effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing
Dear Gerrit,
This issue is discussed in a vignette in the car package (both for functions in the car and effects packages): vignette("embedding", package="car") . The solution suggested there is the essentially the one that you used.
I hope this helps,
John
-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web:
2018 Jan 17
0
effects & lme4: error since original data frame not found WASeffects: error when original data frame is missing
Hi, again,
I have to modify my query since my first (too simple)
example doesn't reflect my actual problem. Second try:
When asking Effect() inside a function to compute an effect
of an lmer-fit which uses a data frame local to the body of
the function, as in the following example (simplifying my
actual application), I get the "Error in is.data.frame(data) :
object 'X' not
2018 Apr 18
3
Problem with regression line
Hello,
I am trying to graph a regression line using the followings:
Age <- c(39, 47, 45, 47, 65, 46, 67, 42, 67, 56, 64, 56, 59, 34, 42, 48, 45,
17, 20, 19, 36, 50, 39, 21, 44, 53, 63, 29, 25, 69)
BloodPressure <- c(144, 220, 138, 145, 162, 142, 170, 124, 158, 154, 162,
150, 140, 110, 128, 130, 135, 114, 116, 124, 136, 142, 120, 120, 160, 158,
144, 130, 125, 175)
SimpleLinearReg1=lm(Age ~
2018 Jan 17
4
effects: error when original data frame is missing
Hello, everyody,
when asking, e.g., Effect() to compute the effects of a fitted,
e.g., linear model after having deleted the data frame from the
workspace for which the model was obtained an error is reported:
> myair <- airquality
> fm <- lm(Ozone ~ Temp, data = myair)
> rm(myair)
> Effect("Temp", fm)
Error in eval(model$call$data, envir) : object 'myair'
2018 Apr 18
0
Problem with regression line
Hi, Anne,
assign Age and Bloodpressure in the correct order
to the axes in your call to plot as in:
plot(y = Age, x = BloodPressure)
abline(SimpleLinearReg1)
Hth -- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel:
2012 Jun 27
4
formula version of sunflowerplot() fails when axis label specified
Hello, R-help,
does anybody have already a work-around for the problem that the formula
version of sunflowerplot() throws an error when provided with a value for
xlab (or ylab) different from NULL:
> sunflowerplot( Sepal.Length ~ Sepal.Width, data = iris, xlab = "A")
Error in model.frame.default(formula = Sepal.Length ~ Sepal.Width, data = iris, :
variable lengths differ
2018 Jan 09
1
barplot_add=TRUE
Dear Gerrit
Thanks a lot. "rbind" seems to be the right function. Unfortunately there is a shift in the x-axis (see pdf). There are 52 trapcatch values each, m and w, but m$trapcatch and w$trapcatch are shifted up to x-value 60.
The follow-up lines for temp and humidity are fine.
Thanks
Sibylle
setwd("~/Desktop/DatenLogger2017") # am Mac sks
trap =
2012 Mar 27
2
Supperscript, subscript and double lines in the main/sub title and using greek letters
Dear R-help,
I am trying to express myself as best as I can here. If you also use Latex
to edit math reports or other languages with similar editing method,
you'll see what I'm talking about. My sincere appologies if my question is
not clear enough to some extend, as also I'm not able to provide my code
here because I don`t know which one I can use...
When editing the title in R
2005 Mar 22
2
lattice xyplot() postscript (?) problem in R 2.0.0
Dear all,
I work with R Version 2.0.0 on
Machine hardware: sun4u
OS version: 5.9
Processor type: sparc
Hardware: SUNW,Sun-Blade-1000
and I have a very simple data frame (called OR) with the following
variables:
> sapply( OR, class)
X ci FTyp
"factor" "numeric" "factor"
(In OR$ci there are some Inf-values. OR's
2018 Jan 09
3
barplot_add=TRUE
Dear R users
aim
Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week).
It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w)
problem
I used the function "add" to
2011 May 05
4
Using functions/loops for repetitive commands
I still need to do some repetitive statistical analysis on some outcomes
from a dataset.
Take the following as an example;
id sex hiv age famsize bmi resprate
1 M Pos 23 2 16 15
2 F Neg 24 5 18 14
3 F Pos 56 14 23 24
4 F Pos 67 3 33 31
5 M Neg 34 2 21 23
I want to know if there are statistically detectable differences in all of
the continuous variables in
2013 Apr 05
1
mixed formatting of integer and numeric (e. g., by summary.default())
Hello, eveRybody,
I've been trying to find the origin for the following
formatting-"inconsistency":
E. g., look at the number of digits in summary.defaults()'s output when
NAs occur: in my example below the number of NA's is displayed as an
integer, the rest as numeric (floating point numbers):
> summary.default( c( 1:2, NA))
Min. 1st Qu. Median Mean 3rd Qu.
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle,
since you write '"mathematically" add', does
barplot(rbind(m$trapcatch, w$trapcatch))
do what you want (modulo layout details)?
Hth -- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel:
2010 Nov 18
3
problems subsetting
Dear all,
I have searched the forums for an answer - and there is plenty of
questions along the same line - but none of the paproaches shown worked
to my problem:
I have a data frame that I get from a csv:
summarystats<-as.data.frame(read.csv(file=f_summary));
where I have the columns Dataset, Class, Type, Category,..
Problem1: I want to find a subset of this frame, based on values in
2011 Mar 15
1
Data Frame Variable Names
Hi,
I have created a dataframe (lets call is df) that contains the following
variables
"Dependent1" "Dependent2" Dependent3" "Independent1"
I want to do the following regressions:
z<- glm( df$Dependent1 ~ df$Independent1)
z<- glm( df$Dependent2 ~ df$Independent1)
z<- glm( df$Dependent3 ~ df$Independent1)
and so on
I wanted to put this in a for
2011 May 09
3
converting a matrix or data.frame into an html table
Dear all,
Is there a function in R to convert a matrix or a data.frame into an html table?
Many thanks,
Samuel
[[alternative HTML version deleted]]
2011 Jul 07
1
Polynomial fitting
Hello,
i'm fairly familiar with R and use it every now and then for math related
tasks.
I have a simple non polynomial function that i would like to approximate
with a polynomial. I already looked into poly, but was unable to understand
what to do with it. So my problem is this. I can generate virtually any
number of datapoints and would like to find the coeffs a1, a2, ... up to a
given
2010 Dec 14
3
Question about cut()
Dear all,
I would like to use cut() to make numerics to factors, the sample codes are as follows. However, the result is not what I want, since r[3] =?9 should be in the interval of "8-10%" rather than "2-4%". Maybe cut() is not the right function to use for my situation. Please help. > r <- c(1,1,9,1,1,1)
> col_no <-
2009 Aug 27
2
Comparing and adding two data series
Dear R helpers
I have two series A and B as given below -
A <- c(2, 2, 1, 3, 7, 3, 3, 1, 14, 7, 31)
B <- c(0.0728,0.9538,4.0140,0.0020,2.5593,0.1620,2.513,0.3798, .0033,0.2282, 0.1614)
I need to calculate the total in dataset B corresponding to the numbers in dataset A i.e. for no 1 in A, I need the total as 4.0140+0.3798 (as 1 is repeated twice)
for no 2, I need the total as
2009 Sep 01
2
Function for all 2^N subsets of N
Greetings all!
I have been searching the Site for a function, say "subsets",
such that for instance
subsets(10)
would return a (say) matrix of indices to the 2^10 subsets of
N items -- perhaps in the form of 2^10 rows each of which is
10 entries each either TRUE or FALSE. Or 1 or 0. Or ...
I can of course write my own, using good old looping technology
or similar, but it would be