similar to: How to make own function load automatically on startup

Displaying 20 results from an estimated 9000 matches similar to: "How to make own function load automatically on startup"

2008 Jan 07
3
Polynomial fitting
I wonder how one in R can fit a 3rd degree polynomial to some data? Say the data is: y <- c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32) x <- seq(3.75, 6, 0.25) And resulting degrees of polynomial are: 5.8007 -91.6339 472.1726 -774.2584 THanks in advance! -- Jonas Malmros Stockholm University Stockholm, Sweden
2007 Dec 17
3
Cannot grasp how to apply "by" here...
I have a data frame named "database" with panel data, a little piece of which looks like this: Symbol Name Trial Factor1 Factor2 External 1 548140 A 1 -3.87 -0.32 0.01 2 547400 B 1 12.11 -0.68 0.40 3 547173 C 1
2007 Dec 17
1
How to create a mixed col.names?
Hello, I have a vector of names, say : names <- c("Factor 1", "Factor 2", Factor 3") I am creating a dataframe and I want the column names to be mixed like this: "Factor 1" " Sign Factor 1" "Factor 2" "Sign Factor 2" "Factor 3" "Sign Factor 3" How can I automate the creation of such a mixed vector? I tried
2008 Mar 19
3
How to remove double loop?
Bill, Alberto, Gabor, Thank you for answering my question. Now I learned about outer() function. That was a straightforward example. But what if I had a matrix, where the last column was filled with values first (again, a for loop), and the rest was filled by using a double loop? OVal <- matrix(0, n+1, n+1) for(i in 0:n){ OVal[i+1, n+1] <- max(Val[i+1, n+1]-K, 0) } for(i in seq(n,1,
2007 Nov 13
1
Cleaning database: grep()? apply()?
Dear R users, I have a huge database and I need to adjust it somewhat. Here is a very little cut out from database: CODE NAME DATE DATA1 4813 ADVANCED TELECOM 1987 0.013 3845 ADVANCED THERAPEUTIC SYS LTD 1987 10.1 3845 ADVANCED THERAPEUTIC SYS LTD 1989 2.463 3845 ADVANCED THERAPEUTIC SYS LTD 1988 1.563 2836 ADVANCED TISSUE
2007 Oct 31
1
textplot() in gplots causes problems (0x9)
Hello, I am using textplot function in gplots package to put some model output inside a PDF file, but it does not seem to work properly with PDF. I am doing follwing: pdf(file="C:/...", paper="a4", width=8, height=12) .model <- lm(.model.formula, data=database) textplot(capture.output(summary(.model)), valign="top", halign="left") I am getting these
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi, i'm trying to read some data from excel files but it seems that neither xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0). When i open the file in Excel and save it in a new format Excel 97 -2003 everything works fine. Is it possible to use ODBC connection to open old format files, or i guess i will have to open and save every file in Excel in new format, which
2011 Oct 11
5
help to ... import the data from Excel
Hi every one ,,,, i have problem in R program to import the data from excel , I have done the following: 1. install.packages("xlsReadWrite") 2. library(xlsReadWrite) 3. z<- read.xls("ReadXls",LTS,colNames=FALSE,sheet,type,form,rowNames=FALSE) and i got on the result: Error in read.xls("ReadXls", LTS, colNames = FALSE, rowNames = FALSE) : object
2007 Jun 09
2
problem with xlsreadwrite package
Hi friends, I have installed R 2.4.0 in my pc. I have a file xls entitled dali following this directory:c://programfiles//R 2.4.0. Recently I have installed xlsreadwrite 1.3.2. but , when I wrote the following lines: >library(xlsReadWrite) >read.xls( file, colNames = TRUE, sheet = 1, type = "data.frame", from = 1, colClasses = NA ) I obtained from R console the following messages:
2010 Dec 08
3
ReadWrite.xls problem
Dear community, I have now taken my R-file from lectures and intend to use it at home, but have a problem reading the Data from the file. I have installed and loaded the Package xlsReadWrite so far. I have also "Changed directory". This is what I have entered daten=read.xls("Daten A2") This is my Error-Message in its German original: Fehler in .Call("ReadXls",
2009 Mar 15
3
read.xls question
I'm an R newbie and had a question about the read.xls function. I've heard that this is often not a reliable function to use for importing data. However, I have created numerous xls files which contain information about voter turnout and macroeconomic indicators in India. I'm writing a paper on the relationship between economic growth and voter turnout. This is the command I use:
2012 Mar 15
2
Importing multiple worksheets from one Excle/ csv file into R
Dear R experts, I am trying to import some data from some Excle files into R. My Excle file contains about 50 sheets. One solution I can think about is to convert my Excle file into csv file first and then load data into R using 'read.csv'. But it seems to me that 'read.csv' only supports reading one sheet (or 'one file') each time, so that seems I have to create 50 csv
2007 Oct 26
1
glm with Student t for error distribution
Hello, My response variable seems to be distributed according to Student t with df=4. I have 320 observations and about 20 variables. I am wondering whether there is a way to fit glm with Student t for error distribution. Student t is not one of the family choices in glm function. How should I proceed to fit glm with Student t? I know that Student t is the Inverse Gamma with shape parameter
2010 Feb 11
3
Failed install of package xlsReadWrite
Does anyone have a work-around for a failed installation of this package? > library(xlsReadWrite) xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular shlib (420 KB) by executing the following command: xls.getshlib() However, the xls.getshlib() command fails
2010 Jul 07
1
xls.getshlib() error in xlsReadWrite package under W7
Dear all, I installed xlsReadWrite package under Windows 7, and got error when trying to run xls.getshlib(). Please, see the errors below: > require(xlsReadWrite) Loading required package: xlsReadWrite xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular shlib
2009 Mar 07
3
Download and Import xls files in R
Dear List, I am trying to solve a problem: I have approximately 100 Excel spreadsheets each with approximately 4 sheet each that I would like to download and import in R for analysis. Unfortunately i realized (i also sent an email to the author or xlsReadWrite() ) that the read.xls() doesn't allow to import the file in R from internet. Here it is the the code:
2011 Jun 23
3
trying to import xls or xlsx files
library(xlsReadWrite) mydata<-read.xls("file path", header=TRUE) however if I change xls to csv it works just fine. Any ideas what I'm doing wrong? I have have also using the package gdata with the exact same error. Below is the error that pops up. Error in findPerl(verbose = verbose) : perl executable not found. Use perl= argument to specify the correct path. Error in
2007 Apr 18
10
importing excel-file
Dear R-experts, It is a quite stupid question but please help me. I am very confuced. I am able to import normal txt ant mat-files to R but unable to import .xls-file I do not understand the online help. Can please anyone send me the corresponding command lines? The .xls-file is attached. In my file we use commas for the decimal format (example: 0,712), changes might be needed. Thanks, Corinna
2007 Dec 20
1
Computing normal conf.intervals
Hi everybody, I wonder if there is a built-in function similar to Matlab's "normfit" which computes 95% CI based on the normality assumption. So, I have a vector of values and I want to calculate 95% normal CI. Of course, I could write my own function, no problem, but I still wonder if built-in functionality exists. (I wish quantile() had this functionality included). Anyone knows?
2011 Aug 24
3
Importing data from MS EXCEL (.xls) to R XXXX
Hello everyone, What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) format to R? In the past I have used the read.xls() function from the xlsReadWrite package, however, I have been wrestling with it all afternoon long with no success. I continue to receive the following error message: > {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls", +