similar to: Finding positions in array

Displaying 20 results from an estimated 5000 matches similar to: "Finding positions in array"

2010 Apr 16
3
run R script from Excel VBA
I wrote a R script say called computeCovarMatrix.R and i want to call and run this piece from Excel visual basic. does anyone know how to do that? thanks, KZ [[alternative HTML version deleted]]
2008 Apr 19
7
Re ad From EXCEL
Hello!!! I have been read a much about as read data from Excel File, but I haven?t found the necesary information to read the data. Now, I can create a channel : channel <- odbcConnectExcel("file.xls") but I don?t know as read the data?? I hope that you could help me. Thank you very much. -- View this message in context:
2008 Feb 13
2
apply on large arrays
I have a big contingency table, approximately of size 60*2*500*500, and I need to count the number of cells containing a count of 1 for each of the factors values defining the first dimension. Here is my attempt: tab1<-with(pisa1,table(CNT,GENDER,ISCOF,ISCOM)) tab2<-apply(tab1,1:4,function(x)ifelse(sum(x)==1,1,0)) tab3<-apply(tab2,1,sum) Computing tab2 is very slow. Is there a faster
2010 Feb 23
5
export tables to Excel files
Dear R users, I've just posted a similar question about Illustrator. This time I would like to export the results of my statistic tables and my dataframes into Excel files. Up to now I've used write.csv(), but I have to resave every file in .xls in Excel. I would like to know if there is a function or package to export directly into *.xls. I have found xlsReadWrite which would be
2009 Oct 19
1
source and textConnection
Is this warning given on purpose? > myconn<-textConnection("print(11*11)") > source(myconn) [1] 121 Warning message: In source(myconn) : argument 'encoding = "native.enc"' will be ignored Could it be omitted, since the docs state that encoding is only use if the corresponding argument is a file name or url? -- Erich Neuwirth, University of Vienna
2007 Aug 15
1
help and Firefox
My configuration is Windows XP, R-2.5.1patched. My standard browser in Windows is Firefox 2.0.6, and I am using htmlhelp. I have problems with starting the browser for displaying help. help("lm") works as it should when Firefox is already running. When I do help("lm") and the browser is not yet started, I get Error in shell.exec(url) :
2009 Nov 07
2
Rpad and R 2.10.0
I have problems with Rpad and R 2.10.0 (Windows XP and Windows 7, browser is Firefox) Just starting Rpad by library(Rpad) Rpad() opens the browser and displays the .html files and the .Rpad files in my home directory, but these files do not have links and are not clickable. Doing the same in R 2.9.2 gives clickable links in the browser. Furthermore, in both cases an empty graphics window
2010 Apr 18
3
loops and if statements
Hello, I am very new to R and data analysis in general. I am trying to generate values to append to my data frame using conditional statements. I am playing with this simple example: a <- c(1:4) b <- c("meep", "foo", "meep", "foo") d <- cbind(a, b) now what I want to do is , each time there is a "meep" in column 2 of d, print
2007 Aug 28
7
Excel
A common process when data is obtained in an Excel spreadsheet is to save the spreadsheet as a .csv file then read it into R. Experienced users might have learned to be wary of dates (as I have) but possibly have not experienced what just happened to me. I thought I might just share it with r-help as a cautionary tale. I received an Excel file giving patient details. Each patient had an ID
2006 Apr 23
3
bivariate weighted kernel density estimator
Is there code for bivariate kernel density estimation? For bivariate kernels there is kde2d in MASS kde2d.g in GRASS KernSur in GenKern (list probably incomplete) but none of them seems to accept a weight parameter (like density does since R 2.2.0) -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at
2008 Oct 26
2
Possible uninstall problem on windows.
I just uninstalled R 2.7.2 on Windows XP after having installed R 2.8.0 The uninstaller removed the String values HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\Current Version HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\InstallPath despite the fact that they pointed to R 2.8.0 The uninstaller did not remove the key HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\2.7.2 (and all the values in that key) I think the
2010 Feb 22
1
RExcel + RCOM + Linux
Dear all, does anyone know if it is possible to connect a Windows RExcel instance to a linux R instance? Within Rexcel, I find the option "Remote Server Address", but I wonder what the installation procedure on my linux (ubuntu) R looks like (if possible at all)? Thanks Philipp
2009 Mar 23
1
subset and "or" operator
Hello, I'm trying to subset a dataframe where I have many observation taken in different years. I would like to subset the dataframe (in this example called "table") to get a new dataframe containing only the observation of year 1995, 1998 and 2000. I've tried to use subset and the or operator "|" like this: subset(table, year==1995|1998|2000)-->table2 but the
2009 Apr 29
1
Help with RExcel (running code)
Hello: First, RExcel completely rocks! Hat tip to the development team. However, I don't understand something very basic about it. Suppose I put the following code in two cells and choose the Run Code option plot(runif(20),runif(20)) text(.5,.5,"Hello") I get the expected plot. HOWEVER, if I put the following in a cell and hit Run Code, I get nothing. runif(20) HOWEVER, If I
2009 Sep 19
2
Use of R in Schools
I am looking for information on experimentation with the use of R in the teaching of statistics and science in schools. Any leads would be very welcome. I am certain that there is such experimentation. I've made this inquiry on r-sig-teaching, with no response. John. John Maindonald email: john.maindonald at anu.edu.au phone : +61 2 (6125)3473 fax : +61 2(6125)5549 Centre
2010 Mar 23
2
rpad ?
Is anyone using rpad? Is there any documentation or examples beyond that in the 'man' directory of the source? -- View this message in context: http://n4.nabble.com/rpad-tp1679534p1679534.html Sent from the R help mailing list archive at Nabble.com.
2009 Aug 17
4
Rounding to the nearest 5
Dear all, A hopefully simple question: how do I round a series of values (held in an object) to the nearest 5? I've checked out trunc, round, floor and ceiling, but these appear to be more tailored towards rounding decimal places. Thanks, Steve _________________________________________________________________ icons.
2006 Jun 15
2
Standard Deviation Distribution
I'm having trouble with the standard deviation distribution as shown on http://mathworld.wolfram.com/StandardDeviationDistribution.html . (Eric Weisstein references Kenney and Keeping 1951, which I can't check.) I believe the graphs they show, but when I code the function in R, according to the listed formula, I get very different graphs. Would someone please point out my error or tell
2010 Mar 09
2
rcom package
Hi,   I would like to make a program that reads excel files, and writes the cells of which contents is not a formula to another file. I don't think this is possible with RODBC, but it may be possible with rcom.     I read the documentation of the rcom package, but I was hoping somebody knows a good web resource for more eleborate info. I tried Googling, but alas (did you know rcom also is a
2009 May 28
4
Read & name multiple excel sheets using RODBC
I'd like to be able to read multiple sheets from an excel workbook and use the sheet name to name the resulting dataframe using RODBC. at the moment i've figured out how to do it the long way (see below) but feel sure that there is a speedier & possibly automatic way to do it in R. i've tried to run a loop using sqlTables but it seemed to break the connection. unless i've