similar to: Help with "old" function in "base"

Displaying 20 results from an estimated 1000 matches similar to: "Help with "old" function in "base""

2008 Jul 25
3
Help with rep
Hi Is it possible to use the rep command (or maybe some other "shortcut") to create a vector with the following format: 4 3 4 2 3 4 1 2 3 4 Any help is much appreciated. Thanks Jacob Jacob L van Wyk Department of Statistics University of Johannesburg, APK Box 524 Auckland Park 2006 South Africa Office Tel: +27 11 559 3080 Fax: +27 11 559 2832 [[alternative HTML version
2008 Jul 26
1
Help with matrix
Hi I have 3 vectors, say g1, g2 and f, where g1 and g2 contain the row and column indices of a matrix, with corresponding elements in f. How can I create a matrix containing the values in f ? For example: g1 g2 f 3 4 10 2 1 30 4 4 50 How can then get a matrix that looks as follows: 0 0 0 0 30 0 0 0 0 0 0 10 0 0 0 50 I am still learning R. I think reshape will
2008 Jul 19
3
R version 2.7.1 (warnings)
Hi I have installed the new version 2.7.1, and get the following messages. Is there some way I can "fix it" ? I use SciViews as well, so the problem may be with one of the libraries that is loaded at start-up: Start-up: Loading required package: datasets Loading required package: utils Loading required package: grDevices Loading required package: graphics Loading required package:
2010 Feb 09
1
Installation require proxy settings (continued)
Thanks to Greg and Michael for their advice. I have tried all these possibilities (and other); nothing seems to work; I persistently get the message: In open.connection(con, "r") : cannot open: HTTP status was '407 Proxy Authentication Required' It seems as if "proxy authentication required" is causing the problem. It seems I have to set up an .Renviron file, but I am
2010 Feb 08
1
R installation require proxy setting
Could somebody please assist with the problem I have now. At our university certain changes have been made to users regarding accessing the internet. I have re-installed the (current) version of R, using custom settings (for Windows XP), choosing amongst other things "Internet2" somewhere. Now, when I wish to install new packages, I first have to select a CRAN mirror. R gives me a list
2010 Jun 10
1
Help with Tinn-R
I have just installed the latest versions of R and Tinn-R (running Windows XP prof.) R 2.11.0 Tinn-R version 2.3.5.2 Everything seems fine, except for the following: I usually do this: Open Tinn-R and click on the R icon to open R - this splits the screen into two parts horiozontally, with Tinn-R on top and R in the bottom window. My problem is simply this: By highlighting one line, and click the
2009 Jun 12
1
Studentized intervals
I am trying to find studentized bootstrap intervals for the skewness of a data set. I have tried the following (nerve.dat is a set of data containing observations on one variable) (using Windows XP): x <- scan("e:/Flashbackup2009/Nonparametrics/nerve.dat") n <- length(x) library(e1071) skewness(x) library(boot) sampleskew <- function(x,d) {return(skewness(x[d]))} bb <-
2010 Feb 10
1
Installation require proxy settings (2)
Hi Thanks again to Greg, and Prof Ripley. Greg, I was trying to send you an email, but has been unsuccessful. Speaking to someone from our IT deparment, I am trying to follow your advice to implement the settings to my computer (using Windows), by using Control Panel. I have selected System in Control Panel and chose System, Advanced tab, Environmental Variables, and created the user variables:
2006 Jul 20
3
Permutation Distribution
Hallo Is there an elegant way to do the following: Dataset consists of 2 variables: var1: some measurements, and var2: a grouping variable with two values, 1 and 2. There are (say) 10 measurements from group 1 and 15 measurements from group 2. The idea is to study the permutation distribution of mean(group 1) * mean(group2). One way would be to permute 1s and 2s and select the corresponding
2009 Jun 26
1
The Claw Density and LOCFIT
I am trying to reproduce Figure 10.5 of Loader's book: Local Regression and Likelihood. The code provided in the book does not seem to work. I have managed (a while ago) to get the accompanied R-code for the figures in the book (file called lffigs.R) from somewhere - cannot find it on the web anymore. The code in the .R script file does not work either. Could anybody please direct me in
2006 Sep 22
2
A simple resampling problem
Dear UseRs I would like to show my students how to use "resampling" to solve the following simple problem: If a family has two children of which one is a boy, what is the probability that the other child is also a boy. The answer is (obviously) 1/3, and can be show easily using the usual methods. But I would like to get the students to think of resampling, by doing the following:
2006 Mar 06
1
LocFit
I have a question regarding the package LOCFIT of C Loader. After fitting a smooth surface (y modeled by two regressors), I can't seem to find a nice way of making a perspective (or other 3d plot). The contours don't look quite so good. It is meant to be used as illustration of smoothing to my students in regression analysis. Could anybody perhaps assist me in producing a
2006 Nov 10
2
Command Line Prompt Symbol
Hi I run R in Windows. Is there a simple way of changing the prompt symbol ">" to, say, "R>" ? (Not just for a temporary session, but every time R command window is opened.) The documentation of doing this is rather "sparse". Much appreciated for your assistance. Jacob Jacob L van Wyk Department of Statistics University of Johannesburg, APK P O Box 524
2006 Mar 13
1
Density Estimation
Hallo I am trying to use the package LocFit to follow the example given in an Introductory note of C Loader concerning density estimation. It involves the "geyser" dataset (107 observations on durations, inlc in the package). I have tried the following (using the latest version of R): fit.of <- locfit(~geyser,flim=c(1,6),alpha=c(0.15,0.9)) plot(fit.of,get.data=T,mpv=200) This
2005 May 25
3
Errors in Variables
I hope somebody can help. A student of mine is doing a study on Measurement Error models (errors-in-variables, total least squares, etc.). I have an old reference to a "multi archive" that contains leiv3: Programs for best line fitting with errors in both coordinates. (The date is October 1989, by B.D. Ripley et al.) I have done a search for something similar in R withour success. Has
2006 Mar 30
2
Plotting a segmented function
This might be a trivial question, but I would appreciate if anybody could suggest an elegant way of plotting a function such as the following (a simple distribution function): F(x) = 0 if x<=0 =(x^2)/2 if 0<x<=1 =2x-((x^2)/2)-1 if 1<x<=2 =1 if x>2 This is just an example. In this case it is a continuous function. But how to do it in general in an elegant way.
2008 Mar 21
1
GAMs
Hi I have been searching for goodness-of-fit tests (or lack of fit tests) for GAMs and cannot find anything. My problem is: after fitting a GAM to mortality data (smoothing crude estimated rates of mortality - a process called graduation in the actuarial literature), (1) how to assess the fit of the model with reference to "adherence to data" for the fitted model (I do not think the
2007 Aug 20
1
Select rows of matrix
Hi I would appreciate if anyone could help me with an elegant solution of the following: I have a matrix that contain a small number of -Inf values. How can form a new matrix from the old one that excludes all the rows with -Inf values ? Thank you. Jacob Dept of Statistics University of Johannesburg South Africa [[alternative HTML version deleted]]
2008 Aug 20
1
Simple estimate of a probability by simulation
Hallo I would appreciate any help with the following. Problem: Suppose A, B and C are independent U(0,1) random variables. What is the probability that A(x^2) + Bx + C has real roots? I have done the theoretical work and obtained an answer of 1/9 = 0.1111. Now I want to show my students to get this in R with simulation. Below are two attemps, both giving the answer to be about 0.26. Could
2007 Mar 09
1
help with zicounts
Dear UseRs: I have simulated data from a zero-inflated Poisson model, and would like to use a package like zicounts to test my code of fitting the model. My question is: can I use zicounts directly with the following simulated data? Create a sample of n=1000 observations from a ZIP model with no intercept and a single covariate x_{i} which is N(0,1). The logit part is logit(p_{i})=x_{i}*beta