similar to: Sweave doesn't do csv.get()

Displaying 20 results from an estimated 1000 matches similar to: "Sweave doesn't do csv.get()"

2006 Apr 10
1
Generic code for simulating from a distribution.
Hello all, I have the code below to simulate samples of certain size from a particular distribution (here,beta distribution) and compute some statistics for the samples. betasim2<-function(nsim,n,alpha,beta) { sim<-matrix(rbeta(nsim*n,alpha,beta),ncol=n) xmean<-apply(sim,1,mean) xvar<-apply(sim,1,var) xmedian<-apply(sim,1,median)
2011 May 04
3
Error in .Fortran Call
I have the following FORTRAN code converted to a DLL: ! my_xmean.f90 ! ! FUNCTIONS/SUBROUTINES exported from my_function.dll: ! my_function - subroutine ! subroutine my_xmean(X,N,XMEAN) ! Expose subroutine my_function to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'my_xmean_'::my_xmean ! Body of my_function DOUBLE PRECISION X(N) XMEAN=0D0 DO J=1,N
2009 Oct 12
1
Kolmogorov smirnov test
Hi r-users,   I would like to use Kolmogorov smirnov test but in my observed data(xobs) there are ties.  I got the warning message.  My question is can I do something about it?   ks.test(xobs, xsyn)           Two-sample Kolmogorov-Smirnov test data:  xobs and xsyn D = 0.0502, p-value = 0.924 alternative hypothesis: two-sided Warning message: In ks.test(xobs, xsyn) : cannot compute correct
2006 Nov 17
2
effects in ANCOVA
Dear R users, I am trying to fit the following ANCOVA model in R2.4.0 Y_ij=mu+alpha_i+beta*(X_ij-X..)+epsilon_ij Particularly I am interested in obtaining estimates for mu, and the effects alpha_i I have this data (from the book Applied Linear Statistical Models by Neter et al (1996), page 1020) y<-c(38,43,24,39,38,32,36,38,31,45,27,21,33,34,28)
2008 Apr 09
1
chi-square test
Hi R-users, I would like to find the goodness of fit using Chi-suare test for my data below: xobs=observed data, xtwe=predicted data using tweedie, xgam=predicted data using gamma > xobs <- c(223,46,12,5,7,17) > xtwe <- c(217.33,39,14,18.33,6.67,14.67) > xgam <- c(224.67,37.33,12.33,15.33,5.33,15) > chisq.test(xobs, xtwe = xtwe, rescale.p = TRUE) Error in chisq.test(xobs,
2010 Apr 08
1
texi2dvi runs but produces no output
I am working on a Windows XP machine with R 2.10.1 and a recent installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents and have it set up to run Sweave, Stangle, and make the PDF through R using a batch script and a MakeSweave.R file. This system worked just fine until I ran some MiKTeX updates yesterday. This is a bit embarrassing as I helped produce a "How-to" guide to
2011 Jul 27
2
Use a list to 'transport' a collection of data sets and results
Hi Everybody I need to "transport" some data and results to use another application (Sweave via LyX - where debugging is very difficult) in order to build a report. Is it possible to store a collection of variables of different types (like named integers, matricies, data frames and two lists) all in one list and save it and then simply load it again later and "unpack" the
2006 Jun 18
1
bug with boot.sw98 function (PR#8999)
Full_Name: Nuno Monteiro Version: 2.3.1 OS: Windows XP HE Submission from: (NULL) (84.9.38.207) I'm using the FEAR library to perform Data Envelopment analysis with a 36,000 obs dataset. The function dea is working fine but then when I try to use the boot.sw98 to come up with some sensitivity analysis I get the following error:
2005 Jul 05
1
by (tapply) and for loop differences
I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates my problem. I get a difference in the mean of yvar, diff and the p-value using tapply & by compared to a for loop. I cannot see what I am doing wrong.
2003 Jan 22
1
something wrong when using pspline in clogit?
Dear R users: I am not entirely convinced that clogit gives me the correct result when I use pspline() and maybe you could help correct me here. When I add a constant to my covariate I expect only the intercept to change, but not the coefficients. This is true (in clogit) when I assume a linear in the logit model, but the same does not happen when I use pspline(). If I did something similar
2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it
2012 Aug 11
1
using eval to handle column names in function calling scatterplot graph function
I am running R version 2.15.1 in Windows XP I am having problems with a function I'm trying to create to: 1. subset a data.frame based on function arguments (colname & parmname) 2. rename the PARMVALUE column in the data.frame based on function argument (xvar) 3. generate charts plotvar <- function(parentdf,colname, parmname,xvar,yvar ){ subdf <-
2019 May 25
3
Increasing number of observations worsen the regression model
I have the following code: ``` rm(list=ls()) N = 30000 xvar <- runif(N, -10, 10) e <- rnorm(N, mean=0, sd=1) yvar <- 1 + 2*xvar + e plot(xvar,yvar) lmMod <- lm(yvar~xvar) print(summary(lmMod)) domain <- seq(min(xvar), max(xvar))??? # define a vector of x values to feed into model lines(domain, predict(lmMod, newdata = data.frame(xvar=domain)))??? # add regression line, using
2007 Nov 15
1
Writing a helper function that takes in the dataframe and variable names and then does a subset and plot
Hi, I have a large dataframe than I'm writing functions to explore, and to reduce cut and paste I'm trying to write a function that does a subset and then a plot. Firstly, I can write a wrapper around a plot: plotwithfits <- function(formula, data, xylabels=c('','')) { xyplot(formula, data, panel = function(x,y, ...) { panel.xyplot(x,y,
2011 Mar 05
2
please help ! label selected data points in huge number of data points potentially as high as 50, 000 !
Dear All I am reposting because I my problem is real issue and I have been working on this. I know this might be simple to those who know it ! Anyway I need help ! Let me clear my point. I have huge number of datapoints plotted using either base plot function or xyplot in lattice (I have preference to use lattice). name xvar p 1 M1 1 0.107983837 2 M2 11
2007 Jun 14
4
question about formula for lm
Dear all; Is there any way to make this to work?: .x<-rnorm(50,10,3) .y<-.x+rnorm(50,0,1) X<-data.frame(.x,.y) colnames(X)<-c("Xvar","Yvar") Ytext<-"Yvar" lm(Ytext~Xvar,data=X) # doesn't run lm(Yvar~Xvar,data=X) # does run The main idea is to use Ytext as input in a function, so you just type "Yvar" and the model should fit....
2011 Aug 30
1
R crash
Dear users, By running the script below, R crashes systematically at the last command, namely dev.off(), on Windows 7, but not on Windows XP. I therefore don't provide a reproducible example and do not really extract the relevant parts of the script because it has most likely nothing to do with the script itself. I can do it though if you think it might be relevant. R crashes on Windows
2012 Sep 20
1
Gummy Variable : Doubt
Hi,   I have a system in which I analyze 2 subjects and 1 variable, so I have 2 models as follow:   y ~ x_1[, 1] + x_2[, 1] + x_1[, 2] + x_2[, 2]   Where   x_1[, i] = cos(2 * pi * t / T_i) x_2[, i] = sin(2 * pi * t / T_i)   i = 1, 2   Data have two columns: t and y.   As you can see, I have a multiple components model, with rithm and without trends, and I have a fundamental
2011 Apr 01
3
programming: telling a function where to look for the entered variables
Hi there, Could someone help me with the following programming problem..? I have written a function that works for my intended purpose, but it is quite closely tied to a particular dataframe and the names of the variables in this dataframe. However, I'd like to use the same function for different dataframes and variables. My problem is that I'm not quite sure how to tell my function in
2005 Dec 26
4
lme X lmer results
Hi, this is not a new doubt, but is a doubt that I cant find a good response. Look this output: > m.lme <- lme(Yvar~Xvar,random=~1|Plot1/Plot2/Plot3) > anova(m.lme) numDF denDF F-value p-value (Intercept) 1 860 210.2457 <.0001 Xvar 1 2 1.2352 0.3821 > summary(m.lme) Linear mixed-effects model fit by REML Data: NULL AIC BIC