Re: [R] XML package example code?

2009-11-24 Thread cls59
Peng Yu wrote: > > I'm interested in parsing an html page. I should use XML, right? Could > you somebody show me some example code? Is there a tutorial for this > package? > Did you try looking through the help pages for the XML package or browsing the Omegahat website? Look at: library(XM

Re: [R] SVM Param Tuning with using SNOW package

2009-11-17 Thread cls59
raluca wrote: > > Hello, > > Is the first time I am using SNOW package and I am trying to tune the cost > parameter for a linear SVM, where the cost (variable cost1) takes 10 > values between 0.5 and 30. > > I have a large dataset and a pc which is not very powerful, so I need to > tune the pa

Re: [R] Error on reading an excel file

2009-11-16 Thread cls59
Gabor Grothendieck wrote: > > That doesn't necessarily follow since the various methods don't use > Excel itself to create the csv file. > I was trying to point out cases where I have seen this behavior and R wasn't involved. Now that I think about it, I have observed to blank cells in a Goo

Re: [R] Writing a data frame in an excel file

2009-11-16 Thread cls59
anna_l wrote: > > Hello, I am having trouble by using the write.table function to write a > data frame of 4 columns and 7530 rows. I don´t know if I should just use > a sep="\n" and change the .xls file into a .csv file. Thanks in advance > Base R cannot write .xls files by it's self. You s

Re: [R] extracting the last row of each group in a data frame

2009-11-16 Thread cls59
jeffc wrote: > > Hi, > > I would like to extract the last row of each group in a data frame. > > The data frame is as follows > > Name Value > A 1 > A 2 > A 3 > B 4 > B 8 > C 2 > D 3 > > I would like to get a data frame as > Name Value > A 3 > B 8 > C 2 > D 3 > > Thank you for your suggesti

Re: [R] pairs

2009-11-16 Thread cls59
David Winsemius wrote: > > ?order > cindy Guo wrote: > > Do you mean if the numbers in each row are ordered? They are not, but if > it's needed, we can order them. The matrix only has 5000 rows. > No, he's suggesting you check out the order() function by calling it's help page: ?order o

Re: [R] Sum over indexed value

2009-11-16 Thread cls59
Gunadi wrote: > > I am sure this is easy but I am not finding a function to do this. > > I have two columns in a matrix. The first column contains multiple entries > of numbers from 1 to 100 (i.e. 10 ones, 8 twos etc.). The second column > contains unique numbers. I want to sum the numbers in

Re: [R] Error on reading an excel file

2009-11-16 Thread cls59
Gabor Grothendieck wrote: > > You could try one of the other methods of reading Excel files and see > if they are affected: > I would guess that since Excel includes the blank rows when exporting to CSV, then blank cells are being stored by Excel in the data files-- therefore any method of ext

Re: [R] Error on reading an excel file

2009-11-16 Thread cls59
anna_l wrote: > > Hello everybody, here is the code I use to read an excel file containing > two rows, one of date, the other of prices: > library(RODBC) > z <- odbcConnectExcel("SPX_HistoricalData.xls") > datas <- sqlFetch(z,"Sheet1") > close(z) > It works pretty well but the

Re: [R] pairs

2009-11-15 Thread cls59
cindy Guo wrote: > > Hi, All, > > I have an n by m matrix with each entry between 1 and 15000. I want to > know > the frequency of each pair in 1:15000 that occur together in rows. So for > example, if the matrix is > 2 5 1 6 > 1 7 8 2 > 3 7 6 2 > 9 8 5 7 > Pair (2,6) (un-ordered) occurs toget

Re: [R] Best advice for connect R and Octave

2009-11-14 Thread cls59
Jason Rupert wrote: > > I see at one time there was a package called ROctave. I tried to install > that package: > >> install.packages("ROctave") > --- Please select a CRAN mirror for use in this session --- > Warning message: > In getDependencies(pkgs, dependencies, available, lib) : > pack

Re: [R] Transforming a dataframe into a response/predictor matrix

2009-11-12 Thread cls59
Ki L. Matlock wrote: > > I currently have a data frame whose rows correspond to each student and > whose columns are different variables for the student, as shown below: > > Lastname Firstname CATALOG_NBR Email StudentID EMPLID > Start > 1 alastname afirstname12

Re: [R] creating custom package and functions

2009-11-10 Thread cls59
dvkirankumar wrote: > > Hi all, > I am new to R-project > I have to create custom package and some required functions in that > package > can any one help me how to create a custompackage and how to write my > function in to that package > These things I have to use in many places as per requir

Re: [R] HEEELP!!!!

2009-11-10 Thread cls59
Ana María Prieto wrote: > > Hello. > My name is Ana. I´m doing an eology master, and I´m just learning how R > works. > I have a Mac OS X 10.5.6, and I´m tryng to run just a simple ANOVA > nanalyses. > I dowloaded R version 2.10.0, and it seems I have problems with the > script. > I don´t know

Re: [R] How to load a specific variable from an RData file?

2009-11-05 Thread cls59
Peng Yu wrote: > > > How to remove the environment 'e1' after I get 'nfree'? > > Did you try rm( e1 ) ? - Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://old.nabble.com/How-to-load-a-specific-varia

Re: [R] How to load a specific variable from an RData file?

2009-11-05 Thread cls59
Peng Yu wrote: > > Thank you. When the RData file is huge, it will take a long time to > load it even though I may only need a small variable. Could somebody > add an option to 'load()' to load only a few given variables? > > Check out the "filehash" package. It has an option that allows you

Re: [R] unexpected results in comparison (x == y)

2009-11-04 Thread cls59
Peter Tillmann wrote: > > Dear readers of the list, > > I have a problem a comparison of two data from a vector. The comparison > yields FALSE but should be TRUE. I have checked for mode(), length() and > attributes(). See the following code (R2.10.0): > > *SNIP* > >> ZZ[4] > [1] 0.02 >> ZZ[

Re: [R] Help with RGDAL

2009-11-04 Thread cls59
Michael D. wrote: > > Hi Charlie! > > Sorry to jump in here so late but I just gave this a try. I usually > install rgdal from CRAN on windows or download the binary from > http://www.kyngchaos.com for Mac. I wanted to try your method from > building from source since the directions were so cl

Re: [R] Help with RGDAL

2009-10-30 Thread cls59
Pablo Alvarez-2 wrote: > > > Hello, > We (two mac users) have been attempting to install rgdal from > "http://www.kyngchaos.com/software:frameworks";, given that it is not > available as a binary on the CRAN (binaries) of the "Package Installer". > > The GDAL library contains an impressive

Re: [R] R crashes

2009-10-30 Thread cls59
premmad wrote: > > Windows XP 32 bit machine. > allocated 2gb as memory for R 2.9.2 > data will be 20mb and was running calculations on the data . > but the r crashes with out any warning or so. > Ahh, well 20 MB is not huge data for R, so there should be no problem with processing it. The pe

Re: [R] R crashes

2009-10-29 Thread cls59
premmad wrote: > > My R crashes frequently when run with huge data. > I'm afraid this is nowhere near enough information for anyone on this list to provide any sort of meaningful insight. At the very least we need to know: * What operating system are you using? * Specifically, for "lar

Re: [R] Re ading and Creating Shape Files

2009-10-29 Thread cls59
PDXRugger wrote: > > Hello R Community, >I have imported a dataset which contain X Y coordinates and would like > to recreate a shape file after some data analysis. What i have done is to > import some taxlot data and join them based on some criteria. I want to > check to see how well the

Re: [R] R 64 and R: using 64-bit versions of packages in R (32)

2009-10-23 Thread cls59
Richard Liu wrote: > > I'm running R 2.9.2 build 5464 on OS X 10.5.8. Having encountered > memory allocation problems, I ran the problematic code in R64, the 64- > bit version of the same build. When I attempt to load openNLP I > receive the error message that the 32-bit version that I h

Re: [R] Diffusion of particles inside a sphere

2009-10-22 Thread cls59
carferper wrote: > > Hello veryone, > > I am interested in the diffusion of particles inside a sphere, and its > release through a small pore on the sphere surface. Unfortunately, I have > not found the way to do this in R. Could you help me? > > Thank very much in advance for your help > >

Re: [R] how to create a new data type

2009-10-22 Thread cls59
Markus Weisner-2 wrote: > > I am working on a new package to do fire department analysis. I am > working > with emergency dispatch data from different agencies that all contain the > same information but have slightly different formats. Typically the > variable names and date-time formats are

Re: [R] .Call() function

2009-10-14 Thread cls59
sdlywjl666 wrote: > > Dear all, > What is the usage of the ".Call()"? > What is the meaning of the follows: > > S=.Call("RS_fractal_spectral_density_function_direct",x,as.vector(taper.),as.logical(center),as.logical(recenter),TRUE,as.integer(npad),COPY=rep(FALSE,6),CLASSES=c(rep("matri

Re: [R] S4 tutorial

2009-10-13 Thread cls59
Peng Yu wrote: > > I'm looking for some tutorial on S4. I only find the following one, > which is not in English. Can somebody let me know if there is any > introductory material? I'm very familiar with OO and C++. If there is > some material that suits my background, it will be great. > > ht

Re: [R] gee: suppress printout

2009-10-12 Thread cls59
joshua wells wrote: > > > Unfortunately, i run thousands of these and the output gets extremely > lengthy. Is there any way to suppress this printout in R? > > Thank you, > > Josh > > One function that comes to mind is sink() which allows you to red

Re: [R] splitting dataframe, assign to new dataframe, add new rows to new dataframe

2009-10-12 Thread cls59
wk yeo wrote: > > > Hi, all, > > My objective is to split a dataframe named "cmbine" according to the value > of "classes". After the split, I will take the first instance from each > class and bin them into a new dataframe, "df1". In the 2nd iteration, I > will take the 2nd available instanc

Re: [R] splitting dataframe, assign to new dataframe, add new rows to new dataframe

2009-10-12 Thread cls59
wk yeo wrote: > > > Hi, all, > > My objective is to split a dataframe named "cmbine" according to the value > of "classes". After the split, I will take the first instance from each > class and bin them into a new dataframe, "df1". In the 2nd iteration, I > will take the 2nd available instanc

Re: [R] Function Help

2009-10-11 Thread cls59
jimdare wrote: > > Hi there, > > I have created the function below: > > pirate<-function(x){ > a<-x-1; b<-a/5; c<-a-b; > d<-c-1; e<-d/5; f<-d-e; > g<-f-1; h<-g/5; i<-g-h; > j<-i-1; k<-j/5; l<-j-k; > m<-l-1; n<-m/5; o<-m-n; > final<-o/5; > > final > } > > I want to run this function until th

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread cls59
cls59 wrote: > > > # recovering par('xaxp') uses the original x limits. > plot.window( xlim = range( par('xaxp')[1:2] ), ylim = range( density(x)$y > )) > > Actually, I misspoke. I believe the following is the voodoo you want for exactly recove

Re: [R] Second y-axis --- alternative to par(new=

2009-10-07 Thread cls59
Rainer M Krug-6 wrote: > > Thanks - but if I want to have the histogram with counts (freq=TRUE), then > I have exactly the situation I was talking about - sorry for not being > clear: > > x <- rnorm(200) > hist(x, col = "blue", freq = TRUE) > lines(density(x), col = "red", lwd = 2) > > i.e. >

Re: [R] Unable to load 'doBy' package

2009-10-06 Thread cls59
Lauren Szathmary wrote: > > Hi all, > > I am trying to load the doBy package, and I am getting the following > error: > >> library(doBy) > Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) : > there is no package called 'Hmisc' > Error: package/namespace load failed for 'doBy' > >

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Yihui Xie wrote: > > > Thanks a lot, Charlie. What a coincidence -- I'm also working on > Sweave functions. parse() and deparse() can make the code more tidy > (they are used in source() and RweaveLatexRuncode()), > >> RweaveLatex > function () > { > list(setup = RweaveLatexSetup, ru

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Duncan Murdoch-2 wrote: > > > Why not just modify their source, and rebuild R? > > Duncan Murdoch > > In my case, the IT guys don't always provide the necessary tools and/or permissions to do this. Which is why we are fortunate that R is so flexible as to allow modification of core routines

Re: [R] Modify base R functions in Rprofile.site

2009-10-04 Thread cls59
Yihui Xie wrote: > > Hi everyone, > > I want to modify two base R functions 'parse' and 'deparse' > immediately after R has started, so I added some code in the file > 'Rprofile.site' under the 'etc' directory. Here is a simple example: > > parse=function(...){ > base::parse(...) > } > >

Re: [R] re ading and analyzing a word document

2009-09-30 Thread cls59
PDXRugger wrote: > > Considering your instructions: > > #Define words to find > to.find <- c( 'the', 'is', 'are' ,'dr') > #Read in the file... > file.text <- readLines( 'data/letter.txt' ) > #Count number of occurnces of deined word in text > line.matches <- unlist( lapply( to.find, grep, x

Re: [R] re ading and analyzing a word document

2009-09-30 Thread cls59
PDXRugger wrote: > > Howdy Y'all, > > So i am looking to read a word document in the following formats(.doc) or > any type of accessible word processor software (e.g. text .txt, notepad, > etc). Had the ability to search certain words, for instance "banana", > "peacock","Weapons" "Mass" "Dest

Re: [R] matrix exponential

2009-09-30 Thread cls59
Kon Knafelman wrote: > > > Hi Guys, > > Im trying to find the exponential of a matrix. > > Can someone please help me do this? > > Thanks a lot > > There was actually a very recent discussion of this, and related operations. See: http://www.nabble.com/imple

Re: [R] Rounding error in seq(...)

2009-09-30 Thread cls59
Martin Batholdy wrote: > > hum, > > can you explain that a little more detailed? > Perhaps I miss the background knowledge - but it seems just absurd to > me. > > 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there? > > Unfortunately this comes as an utter shock to many people wh

Re: [R] Select.spatial on spplots

2009-09-27 Thread cls59
Julius Tesoro wrote: > > Hi everyone. I posted this on R-sig-geo but got no response. > > > Can select.spatial() be used in an existing spplot? I have tried selecting > points (eq) from a plot generated from sp. However, when I invoke > select.spatial(eq). It generates only the points witho

Re: [R] Teach me how to transpose in R

2009-09-27 Thread cls59
Hyo Lee wrote: > > > Teach me how to deal with this problem. > Thank you very much. > > -Hyo > > A good thing to try if you're stuck finding the right function in R is searching with ??. For example, if you type: ??"transpose" The base routine t(), which performs a matrix transpose, is

Re: [R] Downloading data from from internet

2009-09-26 Thread cls59
Duncan Temple Lang wrote: > > > > However, you can use the source form of the package as a Windows > user; you just have to install it. That involves finding out how to do > this > (either with Uwe's Windows package building service or by installing the > tools > that Brian Ripley and Duncan M

Re: [R] evaluate a set of symbols within an IF statement

2009-09-25 Thread cls59
zubin-2 wrote: > > > how do i evaluate this whole list to a single boolean True or False? If > any of these are true the whole statement is True, else False. this > only seems to work for the first ticker, the rest don't perform the > operations within the loop. > > Try %in% tname %in

Re: [R] Downloading data from from internet

2009-09-24 Thread cls59
Bogaso wrote: > > Hi all, > > I want to download data from those two different sources, directly into R > : > > http://www.rateinflation.com/consumer-price-index/usa-cpi.php > http://eaindustry.nic.in/asp2/list_d.asp > > First one is CPI of US and 2nd one is WPI of India. Can anyone please g

Re: [R] Statistical analysis

2009-09-23 Thread cls59
Chris Li wrote: > > Hi all, > > I have got two datasets, one of them is rainfall data and the other one is > groundwater level data. > > I would like to see whether there is a correlation between these two > datasets and if there is, to what extent they are correlated. > > My stats backgroun

Re: [R] Creating loops with strings

2009-09-23 Thread cls59
cls59 wrote: > > > data.file <- paste( set.name, sep='' ) > > assign( set.name, read.dta( file.name ), envir = .GlobalEnv ) > > Opps, those lines should have been: data.file <- paste( set.name, '.dta', sep='' ) as

Re: [R] Creating loops with strings

2009-09-23 Thread cls59
Rakknar wrote: > > Hello. I'm trying to run a series of commands in two different datasets. > For make it efficient I want to make a loop for it. Until now the only > command for loops i found it's the for() command it's only for series of > numbers and not a series of strings, witch it's what

Re: [R] save txt file

2009-09-23 Thread cls59
Eiger wrote: > > Hi, I have 2 questions: > > > Question 1: > > I define 2 variables: "a", "b": > >> a<-rbinom(4,10,0.8) > output: > [1] 9 7 8 8 > >> b<-rbinom(2,6,0.7) > output: > [1] 4 5 > > if I write: >> write.table(a, file = "filename", etc. etc. ) > it save only the values of va

Re: [R] help with $ and % symbols in R

2009-09-18 Thread cls59
Edward Chen-3 wrote: > > Could someone explain to me briefly and point me to where I can find help > on > what the symbols $ and % mean in R? I have seen them in many others' > codes, > but I am still very unsure as to what they mean and what they do. > Thank you very much! > > Help pages fo

Re: [R] dyn.load search path?

2009-09-17 Thread cls59
Steve Jaffe wrote: > > Sorry if this is somewhere in the fine manuals but I've been unable to > locate it. > > Does dyn.load use a search path or does it just look in the current > directory for non-fully-qualified filenames? If there is a search path, > what is it? > > Thanks for your help >

Re: [R] latex code in R -> convert to pdf

2009-09-17 Thread cls59
Martin Batholdy wrote: > > is it possible to convert latex code to pdf in R (like a latex-program > would do it)? > Is there a package that comes with this capabilities? > Unfortunately you're out of luck if you're seeking a direct path from LaTeX code generated in R to pdf without passing

Re: [R] How can I use R:sort function in C code?

2009-09-15 Thread cls59
Guozhu.Wen wrote: > > Hi, I wrote a C extension for R. Within the C code I wanted to invoke the > R's sort function, with the argument "index.return = TRUE". I found it is > a > difficult problem, how can I do that? I have implemented the decreasing > sorting by the code "PROTECT(R_fcall = lang

Re: [R] loading a package .Rda file at package load time

2009-09-14 Thread cls59
Hi, I have seen the answer to this sometime before but I just can't find it again - pointers appreciated. I have a package that contains some data.frames saved as .Rda files in the data/ directory. When the package is loaded I would like to have them be available in the workspace (without the u

Re: [R] Location of Packages?

2009-09-14 Thread cls59
iaw4 wrote: > > Sorry, one more: on OSX, I deleted my old 2.9.2 R.app, and installed the > 64 > bit version of 2.9.0. I then did an "install.packages("car")" under my > new > 2.9.0. It seems to have worked, but alas, I still get an error that > package > 'car' was built under R version 2.9.2

Re: [R] Location of Packages?

2009-09-14 Thread cls59
iaw4 wrote: > > > PS: do I need to install the car packages under the 64-bit version, or > will > it be seen by the 64 bit version if I do a 32-bit install? Or do I need > to > do a double install? for safety, I did it under the command line version, > which I presume is still 32-bit, and th

Re: [R] installation problem

2009-09-14 Thread cls59
wesley mathew wrote: > > Hello All > > I have some problem for installing XML_2.6-0.tar . I am working in widows > and R version is R-2.9.1 > > Unfortunately, I think there are some problems with CRAN being able to build the XML package for Windows, at least the page: http://cran.r-proje

Re: [R] Which "apply" function to use?

2009-09-14 Thread cls59
Masca, N. wrote: > > Dear All, > > I have a problem which *should* be pretty straightforward to resolve - but > I can't work out how! > > I have a list of 3 coefficient estimates for 4 different datasets: > > Coefs<-list(c(1,0.6,0.5),c(0.98,0.65,0.4),c(1.05,0.55,0.45),c(0.99,0.50,0.47)) > >

Re: [R] Question about Factors

2009-09-13 Thread cls59
Chris Li wrote: > > Hi all, > > I am new to R and I have got a question in regards to factors. > > Say I have a simple dataset like the following: > > Name Time Value > a 1:00 1.25 > a 2:00 1.26 > b 1:00 1.29 > b 2:00 1.28 > c 1:0

Re: [R] making package interface with FORTRAN under windows

2009-09-13 Thread cls59
Carrie Li wrote: > > Dear r-help group, > > I am creating a package that has some FORTRAN code under windows. I have > read through "Writing R Extension" but still not so clear about the steps. > > Before R CMD build, how can I create a dynamic library and later in my R > function using dyn

Re: [R] Brand new To R

2009-09-13 Thread cls59
czarjosh wrote: > > I am trying to learn R right now. I came from minitab and wanted to > learn something a bit more robust. I am trying to figure out some simple > probability to measures but I do not know the commands. I am using OSX. > Are there resources for figuring out simple events

Re: [R] The code behind the function

2009-09-09 Thread cls59
Chunhao Tu wrote: > > Hi R users, > I have a question. How can I see the code behind the function. For > example, > >> boxplot > function (x, ...) > UseMethod("boxplot") > > > I really would like to see how people code this. Could someone please show > me how to see the code behind the func

Re: [R] fitting nonlinear model

2009-09-09 Thread cls59
Bill Hyman wrote: > > Hi Milton, > > Thanks for your help. Actually, I would like to fit a non-linear fashion. > For some data like below, 'lm' may not work very well. Do you have idea? > Thanks again! > > That's why information equation you are trying to fit is very important. For example,

Re: [R] fitting nonlinear model

2009-09-09 Thread cls59
Bill Hyman wrote: > > My data look like: > > Np year > 962 > 915 > 897 > 85 10 > > And which equation are you trying to fit to this data? -Charlie - Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in co

Re: [R] Writing R Scripts and passing command line arguments

2009-09-07 Thread cls59
Abhishek Pratap wrote: > > > 1. What's the best way to pass command line arguments to R scripts ? > > As Gabor mentioned, the commandArgs function and the getopt package provide some excellent starting points for this. Abhishek Pratap wrote: > > > 2. How to execute R scripts from comman

Re: [R] Why tempdir() always give me the same results in the same session?

2009-09-06 Thread cls59
Peng Yu wrote: > > > tempdir() always gives me the same result. Should it give a different > result each time I call it? > > The help page for tempdir() contains the following explanation of the return value: ?tempdir ... For tempdir, the path of the per-session temporary directory. I w

Re: [R] R to MATLAB translation

2009-08-10 Thread cls59
apjaworski wrote: > > Hi, > > Is there any package out there that might help me with translating R code > into MATLAB? Using RSiteSearch I found a bunch of "MATLAB stuff" but it > all seems to go in the opposite direction, i.e., emulating MATLAB > functions in R. > > Thanks in advance, >

Re: [R] storing output in html or pdf table format.

2009-07-27 Thread cls59
Albert EINstEIN wrote: > > Hi every one, > Thanks for every one who are all supporting to us. we want some > clarification on output in R. I have generated summary statistics output > for dataset (E.g. sales) in output window. Now i want to store that > output in a html or pdf in a table format

Re: [R] create dataset permanently in package (i.e. default or our own package)

2009-07-27 Thread cls59
Albert EINstEIN wrote: > > Hi, > actually while opening R console and R commander we see some packages like > car and datasets. in this packages we have default datasets are available. > example: women and prestige like that. now i created a sales dataset > importing from excel, xml or text file

Re: [R] moving text labels in plot

2009-07-26 Thread cls59
Luis Iván Ortiz Valencia wrote: > > Hi R users > > I need to specify some parameter input in plot code to move Y text label > to > left. > > plot(temp, develo_rate, xlab = expression(paste("Temperature (C"^o,")")), > ylab = expression(paste("Development rate (d"^-1,")")),las=1,pch=19, >

Re: [R] how to avoid a for looping break after an error message

2009-07-25 Thread cls59
Victor Landeiro wrote: > > Hi all, > I wrote a piece of code that generates simulated variables. after variable > generation I use them in several analyzes. > However, when I use a for to repeat the procedure 1000 times I get an erro > message in one of the "for" steps, precisely at this time:

Re: [R] Include files?

2009-07-24 Thread cls59
Mark Knecht wrote: > > Hi, >I have 15 or 20 functions I've written to convert the sort of data > I'm working with. They are currently in their own R file which I load > by hand in Rgui before loading and running my main programs. > >Is there any way to have this file included in my R pr

Re: [R] A Flash Mob for R Content on Stack Overflow: Tonite @ 7-9pm PST

2009-07-22 Thread cls59
Michael E. Driscoll wrote: > > R Users - > > Tomorrow night, we are leading a group of R programmers to a site > called Stack Overflow, Stackoverflow is a collaborative question and > answer site for programmers, currently lacks much R content. > to populate some of the most oft-asked and relu

Re: [R] space in column name

2009-07-19 Thread cls59
Farrel Buchinsky-3 wrote: > > I sifted some more and read about a workaround for the problem. I could > simply rename the columns so that there were no more spaces > names(alltime) <-gsub(" ",".", names(alltime)) > That would certainly be a solution. The method I was trying to demonstrate is t

Re: [R] space in column name

2009-07-19 Thread cls59
cls59 wrote: > > The following might work: alltime[grep("MIDDLE EAR EXPLORE",alltime[[ "CPT Desc ]] ] -Charlie ACK! Terribly sorry about the double post- but I forgot to close the quote. It should be: alltime[grep("MIDDLE EAR EXPLORE",alltime[[ "

Re: [R] space in column name

2009-07-19 Thread cls59
Farrel Buchinsky-3 wrote: > > I read a table from Microsoft Access using RODBC. Some of the variables > had > a name with a space in it. > R has no problem with it but I do. > I cannot find out how to specify the space > > names(alltime) > [1] "ID""LVL7" "Ref Pv No" "R

Re: [R] how to run a R program with input arguments

2009-07-13 Thread cls59
edisonying wrote: > > I am a beginner in R and know only a little about it yet. I have a script > written in R language, named as "a.txt" for example. I am using a Linux > machine, at present I only know that I can type "R" in the terminal and > then copy-paste the content in "a.txt" to the R's

Re: [R] executing an error prone function without stopping a script

2009-07-09 Thread cls59
TU wrote: > > Dear R Users, > > I've used this a long time ago but have forgotten. Trawling aroung the > various sources somehow does not lead me to it. How can I execute an error > prone function without stopping a script if it goes wrong ? > > Thanks in advance, > Tolga > > See ?try Ba

Re: [R] Tex fonts in R plots

2009-07-09 Thread cls59
KARAVASILIS GEORGE wrote: > > Hello, R users. > I would like to display the font of Math Mode of MikTex 2.3, WinEdt 5.4 > in R plots, e.g. in xlab, ylab or legend. > How can I do that? > Thank you in advance. > > A colleague and I have developed a package called pgfSweave that turns R plots

Re: [R] productivity tools in R?

2009-07-03 Thread cls59
Duncan Murdoch-2 wrote: > > > cls59 wrote: >> >>> I recently noticed that the Mac GUI contains a way to do block >>> selection- so >>> you can select just the code you want to copy and exclude the prompts. >>> Just >>> hold down t

Re: [R] productivity tools in R?

2009-07-03 Thread cls59
Duncan Murdoch-2 wrote: > > The Windows GUI was written before the Mac GUI, and was written using a > fairly strange toolkit, which are two reasons the Mac looks prettier. > But the Windows GUI has a few advantages over the Mac: > > (snip) > > You can copy from the console, prompts and al

Re: [R] parallel R?

2009-06-26 Thread cls59
losemind wrote: > > > Moreover, at my PC level, I have a 4-core PC, is there anything we > could do in R to speed up my CV programs? > > I have seen one very nice paper that compared parallelization options for R: http://epub.ub.uni-muenchen.de/8991/ losemind wrote: > > > we have to re

Re: [R] Partitioning matrix

2009-06-23 Thread cls59
Bogaso wrote: > > Let say, I have following matrix : > > dat <- matrix(rnorm(40), 2, 20) > > Now I want to partition this like this : > > dat1 <- dat[1,] > dat2 <- dat[2,] > > But point is that, dat1 and dat2 become vector object. How can I force > them to be matrix object with dimension (1x

Re: [R] Calling Fortran from C++

2009-06-01 Thread cls59
Giura Gauss wrote: > > Hi, > > can anybody point me to a package with C++ code that call Fortran > subroutines? > > I am trying to do the same thing but we scarce success. > > Error in dyn.load("utils.so") : > unable to load shared library 'utils.so': > dlopen(utils.so, 6): Symbol not fou

Re: [R] What's a Data Frame?

2009-05-17 Thread cls59
prixel wrote: > > im completely confused. could someone please help. > > i have a series of data (0,0,0,0,1,1,0,0,0) and i need to create a data > frame with it. but what is a data frame? > > thankyou :) > A data frame is similar to a matrix- however each column may be of a different data

Re: [R] Graphical output format

2009-05-15 Thread cls59
baptiste auguie-2 wrote: > > > Just a thought: > > There was recently a discussion here on the pgfSweave [1] driver --- > it should be possible to use it in conjunction with XeTeX [2] to > process the pgf output. Presumably there will be issues of alignment > and spacing but at least ar

Re: [R] About the efficiency of R optimization function

2009-05-15 Thread cls59
popo UBC wrote: > > Hi Charlie, > > Thank you so much for suggestions!! > > Actually, I used the optimization toolbox in MABLAB before and I even > wrote > some numerical optimization programs by myself. As far as I know, some > commercial optimization softwares had already replaced L-BFGS-B

Re: [R] About the efficiency of R optimization function

2009-05-14 Thread cls59
popo UBC wrote: > > Hi all! > > The objective function I want to minimize contains about 10 to 20 > variables, > maybe more in the future. I never solved such problems in R, so I had no > idea about the efficiency of R's optimization functions. I know doing loop > in R is quite slow, so I am n

Re: [R] Sweave: Howto write real TeX formula in plot

2009-05-14 Thread cls59
Bugzilla from n...@jonasstein.de wrote: > > Thank you, Baptiste and Charlie. > I found some examples wich look great on: > http://www.texample.net/tikz/examples/ > I'm glad you found Texample! It is an excellent site that shows many practical, and beautiful, demonstrations of the types of figu

Re: [R] Centering R output in Sweave/LaTeX

2009-05-14 Thread cls59
Jean-Louis Abitbol-2 wrote: > > Good Day to All, > > When sweaving the following: > > \begin{table} > \centering > <>= > ftable(ifmtm$type, ifmtm$gender, ifmtm$marche , ifmtm$nfic, > dnn=c("Type","Gender","Ambulant","Visit")) > @ > \caption{Four-way cross-tabulation on all data} > \label{tab:

Re: [R] I don't see libR.so in my installation directory

2009-05-09 Thread cls59
Tena Sakai wrote: > > > > I became aware of such as I was preparing for > an installation of little r. The installation > material stated to look for libR.so, and I want > to make sure that the one I installed (2.9.0) > is used by little r. > > > little r... do you mean the scripting fr

Re: [R] Seed of Random number generation

2009-05-01 Thread cls59
RON70 wrote: > > Dear all, is it possible to extract the seed that was used for some random > number generation? For example suppose I draw a random sample of size 1000 > from a normal population : > > rnorm(1000) > > Now I want to know what seed R used for that sample generation. Any way > ou

Re: [R] Sweave: Howto write real TeX formula in plot

2009-04-19 Thread cls59
Bugzilla from n...@jonasstein.de wrote: > > Hi, > > i use Sweave to put plots in my .tex Documents. (pdflatex) > Is there a nice solution for this: > > a) get a real LaTeX formula in the plot area. > I have only found very complicate solutions. Is there sth. like > \formula{x^2 = \oint f} >

Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-17 Thread cls59
cameron.bracken wrote: > > I know the first time I set width=3 and the plot still spanned 80% of > the page threw me off. > I second this. - Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nab

Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-16 Thread cls59
markheckmann wrote: > > > The pdf() settings do not affect Sweave settings when producing a .pdf > graphic. How can I change the Sweave default settings to e.g. 3 inch? > > Try setting the width and height options in the figure chunk: <> plot(1:10 @ To make a certain set of dimensions

Re: [R] Compiling Fortran Subroutines as R Shared Objects on Mac OS-X

2009-04-15 Thread cls59
Chad R. Bhatti wrote: > > > Hello, > > I am trying to compile some F77 subroutines as shared objects for R on my > Mac. > --> Mac OS-X Version 10.4.11 (Tiger Intel Mac) > > > > chad-r-bhattis-computer:~/MyR/Examples/Fortran/Test1 chadrbhatti$ R CMD > SHLIB two.f > gfortran -arch i386 -fP

Re: [R] using Sweave, how to save a plot in a given size

2009-04-15 Thread cls59
Lo_Lo wrote: > > > I just want to add that I didn't have any overful box before I use : > > <>= > pdf("fig1.pdf", > width = wid, heigth = hei) > plot(1:10) > plot(1:10) > dev.off() > cat("\\begin{figure}[h]") > cat("\\centering") > cat("\\multido{\i=1+1}{7}{\includegraphics[page=\i,width=1.5i

Re: [R] I want to use Sweave, but only sometimes

2009-04-13 Thread cls59
Paul Johnson-11 wrote: > > Does anybody have a workable system to run an Rnw document through > R-Sweave when necessary, but to just run it through LaTeX if no new R > calculations are needed? I.e., the figures already exist, I do not > need R to do more work for me, so I send the document stra

Re: [R] Cross-platforms solution to export R graphs

2009-04-12 Thread cls59
Philippe Grosjean wrote: > > > ..I would be happy to receive your comments and suggestions to improve > this document. > All the best, > > PhG > > LaTeX is my personal tool of choice and the vector format I use most often is http://sourceforge.net/projects/pgf/ PGF (Portable Graphics For

  1   2   >