Displaying 20 results from an estimated 1100 matches similar to: "Ubuntu installation"
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how
to find the answer
I want to recursively loop over an object and trim trailing white space.
When I use this function on a list of data.frame I get output like this:
[1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces
\", \" many spaces
2012 Jul 29
1
Zoo panel function
I would really like some help with understanding the panel function, in
zoo. Thank you.
R 15.1 and zoo 1.7-7.
library(zoo)
x = seq(0,3*pi,length.out=100)
y = sin(x)
zobj = zoo(y, x)
###########################################################
## EXAMPLE 1 - GLOBAL ARGUMENT
## This panel function works
## But, it relies on mycol, which is a global variable
2011 Dec 07
1
RSPython installation
Does anyone know if Is there a way to manually install RSPython?
I get this error when I try to run the script from my DOS prompt.
V:\>R CMD INSTALL -c C:/Users/gene.leynes/Downloads/RSPython_0.7-1.tar.gz
* installing to library 'C:/Users/gene.leynes/Documents/R/win-library/2.13'
* installing *source* package 'RSPython' ...
**********************************************
2011 Apr 18
1
having trouble with "R CMD INSTALL"
Hello,
I was having trouble passing in command line options when doing an package
install earlier.
>From An Introduction in R
> In addition, you can use25<http://cran.r-project.org/doc/manuals/R-intro.html#fn-25>options
> --arch=, --no-environ, --no-init-file, --no-site-file and --vanillabetween
> R and CMD: these affect any R processes run by the tools. (Here --vanillais
2012 Jul 25
3
Installing packages "xslx" on Ubuntu (32bit)
Hi,
I just recently changed my OS to Ubuntu 12.04 (32bit). Now I tried to install some packages required by my old and working scripts. Unfortunately I fail when trying to install the package "xslx". Maybe it is related to the 32bit version of my R (its not possible to install a 64 bit version).
Can anyone help me to sucessfully install xslx?
Here some console output (e.g.
2012 Feb 02
2
Problem with range()
Hello,
I'm using range do define boundaries for a linear model, so the line I
graph is only graphed for the range of data. There are NAs in the
data, but I dont remember this being a problem before. I typed
na.action=na.omit anyway, which has usually solved any NA issues in
the past. Any idea why R cant do vector functions for these data?
Solution?
Thanks,
Colin Wahl
M.S. Biology candidate
2012 May 26
3
Problem with readHTMLTable
Hello All,
i was trying to simply run the readHTMLTable on the example published in the
package. And on a page I was working on. So running:
u = "http://en.wikipedia.org/wiki/List_of_countries_by_population"
tables = readHTMLTable(u)
returns the following error:
Error in tb[["thead"]] : subscript out of bounds
looking up this error on the web, didnt give me any hint. Is
2013 Feb 11
1
Putting an array from excel into R Studio
Dear All,
I have been using RExcel for some time and find two features especially useful:
i) The ability to select part of a worksheet and put it into R
ii) The way of viewing the code, the output and the alerts in separate panes.
The rest of R Excel I don't really use.
The major benefit for me is i) as I can use the excel as a sort of
fast access database which is convenient to edit. I can
2011 Sep 06
2
Possible to access a USB volume by name in windows
On the Mac it's pretty easy to get to a USB drive by name. For example the
following command works if you have a USB drive named "MYUSB"
setwd('/Volumes/MYUSB')
Is there a way to do the same thing in Windows (without knowing the drive
letter)?
Thanks!
[[alternative HTML version deleted]]
2011 Aug 29
3
replacing elements of a zoo object
Why doesn't this work?
x = zoo(1:5, as.Date('2001-01-01')+1:5)
x[as.Date('2001-01-05')]
x[as.Date('2001-01-05')] = 0
x
I think this is especially bad because it doesn't cause an error. It lets
you do something to x, but then you can't see x again to see what it did.
[[alternative HTML version deleted]]
2012 Sep 19
1
issue accessing help files
Dear R-help community,
I am unable to access help files when using the typical
"?function.of.interest" command.
For example, if I type "?anova", Internet Explorer opens, but I am never
connected to the usual page describing the nuances of the anova function.
This is a new problem (just started occurring a few days ago). I am
currently using R 2.14.1 on a Windows XP machine.
2011 Dec 06
2
read.table performance
** Disclaimer: I'm looking for general suggestions **
I'm sorry, but can't send out the file I'm using, so there is no
reproducible example.
I'm using read.table and it's taking over 30 seconds to read a tiny file.
The strange thing is that it takes roughly the same amount of time if the
file is 100 times larger.
After re-reviewing the data Import / Export manual I think
2010 Jul 09
3
apply is slower than for loop?
I thought the "apply" functions are faster than for loops, but my most
recent test shows that apply actually takes a significantly longer than a
for loop. Am I missing something?
It doesn't matter much if I do column wise calculations rather than row wise
## Example of how apply is SLOWER than for loop:
#rm(list=ls())
## DEFINE VARIABLES
mu=0.05 ; sigma=0.20 ; dt=.25 ; T=50 ;
2011 Feb 23
4
The L Word
I've been wondering what L means in the R computing context, and was
wondering if someone could point me to a reference where I could read about
it, or tell me what it's called so that I can search for it myself. (L by
itself is a little too general for a search term).
I encounter it in strange places, most recently in the "save" documentation.
save(..., list = character(0L),
2012 Jan 24
1
Failure to get compactPDF to compact a pdf file
I am failing to get compactPDF to make any change to a pdf file
that, a/c to the message from the CRAN upload site, can be very
substantially compacted. Any ideas what may be wrong?
I have also tried recreating the pdf file. I also tried
R CMD build --resave-data --compact-vignettes DAAG
The data files compact alright (but I get the 'significantly better compression'
warning message
2012 Jan 30
4
replacing characters in matrix. substitute, delayedAssign, huh?
A user question today has me stumped. Can you advise me, please?
User wants a matrix that has some numbers, some variables, possibly
even some function names. So that has to be a character matrix.
Consider:
> BM <- matrix("0.1", 5, 5)
Use data.entry(BM) or similar to set some to more abstract values.
> BM[3,1] <- "a"
> BM[4,2] <- "b"
>
2011 Sep 26
4
Testing for arguments in a function
I don't understand how this function can subset by i when i is missing....
## My function:
myfun = function(vec, i){
ret = vec[i]
ret
}
## My data:
i = 10
vec = 1:100
## Expected input and behavior:
myfun(vec, i)
## Missing an argument, but error is not caught!
## How is subsetting even possible here???
myfun(vec)
Is there a way to check for missing function arguments, *and*
2010 Apr 19
2
How to pass a list of parameters into a function
Does anyone know how to pass a list of parameters into a function?
for example:
somefun=function(x1,x2,x3,x4,x5,x6,x7,x8,x9){
ans=x1+x2+x3+x4+x5+x6+x7+x8+x9
return(ans)
}
somefun(1,2,3,4,5,6,7,8,9)
# I would like this to work:
temp=c(x3=3,x4=4,x5=5,x6=6,x7=7,x8=8,x9=9)
somefun(x1=1,x2=2,temp)
# OR I would like this to work:
temp=list(x3=3,x4=4,x5=5,x6=6,x7=7,x8=8,x9=9)
2009 Jul 22
3
How to replace NAs in a vector of factors?
# Just when I thought I had the basic stuff mastered....
# This has been quite perplexing, thanks for any help
## Here's the example:
db1=data.frame(
olditems=c('soup','','','','nuts'),
prices=c(4.45, 3.25, 4.42, 2.25, 3.98))
db2=data.frame(
newitems=c('stew','crackers','tofu','goatsmilk','peanuts'))
2012 Feb 23
1
Sexpr not getting expanded in Sweave
An Sweave file, 'test.Rnw':
\documentclass{article}
\title{Sweave minimal}
\author{MK}
\begin{document}
\maketitle
We try Sweave:
<<1>>=
data(airquality)
summary(airquality)
x <- airquality[1, 1]
@
I try Sexpr: \Sexpr{x}
We plot:
\begin{center}
<<2, fig=TRUE, echo=FALSE >>=
boxplot(Ozone ~ Month, data = airquality)
@
\end{center}
\end{document}
I check the