[R] Restructuring Star Wars data from rwars package

2017-08-03 Thread Matt Van Scoyoc
I'm having trouble restructuring data from the rwars package into a dataframe. Can someone help me? Here's what I have... library("rwars") library("tidyverse") # These data are json, so they load into R as a list people <- get_all_people(parse_result = T) people <-

Re: [R] fread transforms numbers

2017-03-22 Thread Matt Dowle
ed to be used for package support. The main thing though is thanks for helping me find this bug. Thanks, Matt On Wed, Mar 22, 2017 at 10:22 AM, William Dunlap <wdun...@tibco.com> wrote: > Here is a way to reproduce the problem: > > data.table::fread("9876543210\n"

[R] Validating Minitab's "Expanded Gage R Study" using R and lme4

2017-02-15 Thread Matt Jacob
del failing to converge and being nearly unidentifiable? What could Minitab be doing differently when the measurement data contains only two distinct values? Matt This question is cross-posted to http://stats.stackexchange.com/questions/262170/how-can-i-validate-minitabs-expand

[R] class-specific Gini metrics for Random Forest?

2015-10-13 Thread Matt Fagan
library(randomForest) data(iris) fit <- randomForest(Species ~ ., data=iris, importance=TRUE); fit.imp<-importance(fit) fit.imp columns 1-3 of fit.imp show the class-specific variable importance for the Mean Decrease Acuracy measure (MDA). Is there a way to calculate class-specific Gini metrics

Re: [R] reshape: melt and cast

2015-09-01 Thread Matt Pickard
554", "1555", "1556", "1558", "1559"), class = "factor"), RaterName = structure(c(2L, 2L, 2L, 2L, 2L, 2L), .Label = c("cwormhoudt", "zspeidel"), class = "factor"), SI1 = c(1L, 1L, 1L, 1L, 1L, 1L), SI2

[R] reshape: melt and cast

2015-08-31 Thread Matt Pickard
Hi, I have data that looks like this: *> head(ratings) QCode PID RaterName SI1 SI2 SI3 SI4 SI5 SI6 SI7 SI8 SI9 SI10 SI111 GUILT 1123 cwormhoudt 2 2 3 1 1 1 3 3 3 212 LOVE 1123 cwormhoudt 1 2 3 2 1 1 1 1 11 33 GUILT 1136 cwormhoudt 1 2

[R] hurdle control and optim

2015-08-17 Thread Matt Dicken
' and 'abstol' How do I write the script for Hurdle control to solve these issues? Any help would be really appreciated All the best Matt Dr. Matt Dicken Senior Scientist Telephone: 0315660400 | Fax: 0315660493 | Email: m...@shark.co.za Physical Address: 1a Herrwood Drive, Umhlanga Rocks, 4320

Re: [R] hurdle control and optim

2015-08-17 Thread Matt Dicken
Dear Achim, Apologies for the cross posting and confusion. I really appreciate the help All the best Matt -Original Message- From: Achim Zeileis [mailto:achim.zeil...@r-project.org] Sent: 17 August, 2015 10:06 PM To: Matt Dicken m...@shark.co.za Cc: r-help@r-project.org Subject: Re

[R] Reproducing a 3d yield curve plot from New York Times

2015-06-04 Thread matt
than along y. Thanks in advance. I've tried to find a reference to this in the archives and have come up empty. As well, I've tried to make this reproducible. Matt __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

[R] Processing key_column, begin_date, end_date in R

2015-02-25 Thread Matt Gross
with begin_date and end_date pairs for the same key_column. In situations where overlap exists I want to have one record for the key_column with the min(begin_date) and the max(end_date). Can anyone help me build the commands to process this data in R? Thanks, Matt -- Matt Gross gro

Re: [R] global environment

2015-01-12 Thread Matt Warpinski
Rewrite it with spaces between your assigns and numbers. This line is unclear to me: if(rst[i]-3 rst[i]=-3) Is it supposed to be rst[i] - 3, or rst[i] -3? R might be misinterpreting what you're trying to get it to do. On Mon, Jan 12, 2015 at 1:18 AM, Methekar, Pushpa (GE Transportation,

[R] Parsing Google Finance page data?

2014-11-20 Thread Matt Considine
in and hopefully someone has already done this. (For what it is worth, the only info I am looking for are the ticker, exchange, currency and Mkt Cap datapoint) Thanks in advance for any help - scraping is not my strong suit. Matt --- This email is free from viruses and malware because avast

Re: [R] Parsing Google Finance page data?

2014-11-20 Thread Matt Considine
matching a name, that would be helpful. (Though that question should probably go to the finance list). In any case, thanks in advance for any thoughts put towards this. Matt library(RCurl) library(xts) library(XML) #want to return results of this # http://www.google.com/finance?q=ibm coname - ibm

[R] Problem Invoking System Commands from R

2014-10-11 Thread Matt Borkowski
last successfully ran this script...I'm wondering if this might be a permissions issue or other security setting preventing me from invoking system commands. Any ideas? -Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Problem Invoking System Commands from R

2014-10-11 Thread Matt Borkowski
machine last night and reinstalled R and wget...and was successfully able to run the script. Old machine is Windows XP versus Windows 8.1 on my new machine. Perhaps this confirms it is a Windows permission issue and not an R problem? -Matt On Saturday, October 11, 2014 3:00 AM, Prof Brian Ripley

[R] Help with continuous color plot

2014-09-24 Thread matt
that accomplishes my task, or give me some ideas as to how to code this? Below is a reproducible dataset and the code I ran that generated the above error. And apologies in advance if I have overlooked some obvious source - I'm not exactly sure what keywords to search for. Regards, Matt

Re: [R] Help with continuous color plot

2014-09-24 Thread matt
],col=black) If anyone can suggest a more efficient/effective/better/etc/etc way of doing this, I'd be grateful. In a nutshell, I am trying to find a visually clean way of showing the output of a Monte Carlo analysis. Thanks again for everyone's attention. Matt On 2014-09-24 14:14, Federico

Re: [R] plotly

2014-07-22 Thread Matt Sundquist
Hey Shane, Sorry you're having trouble. The quick start is here and walks through installation: https://plot.ly/r/. A note. If you're on Windows, you'll need Rtools to install devtools: http://cran.rstudio.com/bin/windows/Rtools/. As Sarah noted, Plotly isn't on CRAN. If you're having trouble,

[R] Plotly and rOpenSci: R and ggplot2 interactive, online, collaborative plotting

2014-05-12 Thread Matt Sundquist
Hello R help, My name is Matt, and I'm a co-founder at Plotly http://plot.ly, an online graphing and analytics project. We're building an R library http://plot.ly/r as part of the rOpenScihttp://ropensci.orgproject. You can use it to make interactive, web-based R and ggplot2 plots. The plots

[R] Plotly Beta: Online Plotting with R

2014-01-24 Thread Matt Sundquist
Hi R Users, My name is Matt, and I'm a part of Plotly http://plot.ly. We recently released an R plotting library http://plot.ly/api/r for making publication-quality graphs online. We wanted to let the folks on this list know. A basic summary: - Make publication-quality, online plots with a GUI

[R] How to assign names to global data frames created in a function

2013-09-03 Thread Matt Strauser
frame2cond3cond4 frame2cond5cond6 Thank you for your thoughts, Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Computing Median for Subset of Data

2013-06-02 Thread Matt Stati
to be able to compute the median of a variable first for the larger data set timeuse then for the subset file subset_1. How do I identify to R which data set I'm wanting the median computed for? I've tried many possibilities but for some reason can't figure it out.  Thanks,  Matt

[R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
...especially when I need to repeat this for another 8 datasets. Can anyone point me in the right direction? Thanks! Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
the following solution which works for matching a single condition, but I couldn't quite figure out how to  modify it it to search for both my acceptable conditions... testdata - testdata[testdata$REC.TYPE == SAO,,drop=FALSE] -Matt --- On Sun, 3/3/13, jim holtman jholt...@gmail.com wrote

Re: [R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
by the relative complexity of the data frames solution, as it seems like more steps than necessary. Thanks again for the input! -Matt Again, thanks for the feedback! --- On Sun, 3/3/13, arun smartpink...@yahoo.com wrote: From: arun smartpink...@yahoo.com Subject: Re: [R] Help searching

Re: [R] Amelia algorithm

2013-01-12 Thread Matt Blackwell
at our webpage: http://gking.harvard.edu/amelia Hope that helps! Cheers, matt. ~~~ Matthew Blackwell Assistant Professor of Political Science University of Rochester url: http://www.mattblackwell.org On Mon, Jan 7, 2013 at 6:27 PM, zGreenfelder zgreenfel...@gmail.com wrote: On Mon

[R] Oracle Approximating Shrinkage in R?

2012-12-08 Thread Matt Considine
Hi, Can anyone point me to an implementation in R of the oracle approximating shrinkage technique for covariance matrices? Rseek, Google, etc. aren't turning anything up for me. Thanks in advance, Matt Considine __ R-help@r-project.org mailing

Re: [R] Performing gage RR study in R w/more than 2 factors

2012-11-20 Thread Matt Jacob
basically been trying to match up the output of R with the output of Minitab to check my work. Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Performing gage RR study in R w/more than 2 factors

2012-11-20 Thread Matt Jacob
statistics. It doesn't look like lm gives me that information, though. FWIW, your formula is the same as what I'm feeding into aov, and the ANOVA table output *does* match up with what Minitab is producing. Matt __ R-help@r-project.org mailing list

[R] Performing gage RR study in R w/more than 2 factors

2012-11-19 Thread Matt Jacob
factors are random, the formula I'm using looks like this: vals ~ 1 + (1|f1) + (1|f2) + (1|f3) + (1|f1:f2) + (1|f1:f3) + (1|f2:f3) What am I doing wrong, and how can I fix it? Thanks, Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Opening SAS file using read.sas7bdat() function in sas7bdat library.

2012-10-30 Thread Matt Shotwell
be laid out differently by different compilers (i.e., on different platforms), this may have led to the difficulty apparent here. Regards, Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Any good R server-with connection examples

2012-10-23 Thread Matt Shotwell
user input from the web browser. The site has some decent documentation and links to examples. --Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] unable to run spatial lag and error models on large data

2012-07-24 Thread shish matt
Hi: First my apologies for cross-posting. A few days back I posted my queries ar R-sig-geo but did not get any response. Hence this post. I am working on two parcel-level housing dataset to estimate the impact of various variables on home sale prices. I created the spatial weight metrics in

[R] Data from Stock and Watson or DAgostino papers?

2012-07-16 Thread Matt Considine
know where else I could search for this answer (and - yes - I have tried Google ...) Thanks in advance, Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

[R] Does aov produce one-sided or two-sided p-values?

2012-05-21 Thread Matt Pickard
Hi - Hopefully this is an easy question. In SPSS, when I'm testing a directional hypotheses using an ANOVA (GLM), I can divide the p-value by 2 because SPSS reported two-sided p-values? Is this approach still legit when I'm using aov in R? Thanks, Matt [[alternative HTML version

Re: [R] Random forests prediction

2012-05-14 Thread matt
But shouldn't it be resolved when I set mtry to the maximum number of variables? Then the model explores all the variables for the next step, so it will still be able to find the better ones? And then in the later steps it could use the (less important) variables. Matthijs -- View this message

[R] Random forests prediction

2012-05-11 Thread matt
Hi all, I have a strange problem when applying RF in R. I have a set of variables with which I obtain an AUC of 0.67. I do have a second set of variables that have an AUC of 0.57. When I merge the first and second set of variables, the AUC becomes 0.64. I would expect the prediction to

[R] reception of (Vegan) envfit analysis by manuscript reviewers

2012-05-09 Thread Matt Bakker
separates the communities, not the relationship between the edaphic factor and the Bray-Curtis distance. Thanks for any suggestions! Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Gwet's AC1

2012-05-07 Thread Matt Stati
R has functions for computing kappa, fleiss's kappa, etc., but can it compute Gwet's AC1? Thanks, Matt. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Nested brew call yields Error in .brew.cat(26, 28) : unused argument(s) (26, 28)

2012-03-29 Thread Matt Shotwell
On Wed, 2012-03-28 at 11:40 +0100, Chris Beeley wrote: I am writing several webpages using the brew package and R2HTML. I would like to work off one script so I am using nested brew calls. The documentation for brew states that: NOTE: brew calls can be nested and rely on placing a function

[R] Help with Matrix code optimization

2012-02-23 Thread Matt Shotwell
The chol and solve methods for dpoMatrix (Matrix package) are much faster than the default methods. But, the time required to coerce a regular matrix to dpoMatrix swamps the advantage. Hence, I have the following problem, where use of dpoMatrix is worse than a regular matrix. library(Matrix) x

[R] repeating or looping within an apply statement to handle multiple variables

2012-02-19 Thread Matt Spitzer
(a)/sqrt(length(a)), '95ci'= qt(0.975, (length(a)-1)) * sd(a)/sqrt(length(a)), 'mean/sd'=mean(a)/sd(a), 'se/sd'=(sd(a)/sqrt(length(a)))/sd(a), '95ci/sd'=(qt(0.975,(length(a)-1))*sd(a)/sqrt(length(a)))/sd(a) )} ) ) Thanks again for your help, Matt [[alternative HTML version deleted

[R] how to rbind matrices from different loops

2012-02-16 Thread Matt Spitzer
of the groups varies in number, so my repetitive example below is not accurate. In my real data, ids repeat often within groups. Thank you so much, Matt example - data.frame(id=rep( ( abs(round(rnorm(50,mean=500,sd=250),digits=0))) ,3), group=rep(1:15,10)) example -example[with(example,order(id,group

Re: [R] function restrictedparts

2012-01-25 Thread Matt Shotwell
these restricted partitions one by one; see R ?partitions::nextpart Matt On Wed, 2012-01-25 at 15:11 +, yan jiao wrote: I am using function restrictedparts, but got error: restrictedparts(281,10) Error in integer(len) : vector size specified is too large Calls: restrictedparts

Re: [R] Bayesian data analysis recommendations

2012-01-20 Thread Matt Shotwell
also the R package rjags, by the same author). Another tool that I'm planning to check out is PyMC: http://code.google.com/p/pymc/ Best, Matt On Thu, Jan 19, 2012 at 7:07 PM, Rich Shepard rshep...@appl-ecosys.com wrote: On Thu, 19 Jan 2012, C W wrote: I am trying to learn Bayesian

[R] Reading MINE output into a matrix

2012-01-15 Thread Matt Considine
output column (in the case below, the third column corresponding to MIC) into a matrix. Hope it helps, Matt #needed for MINE routine require(rJava) #load market data require(PortfolioAnalytics) data(indexes) #write CSV file of data to current working directory datafilename - indexes.csv write.table

Re: [R] Help creating a symmetric matrix?

2011-12-24 Thread Matt Considine
Thank you all for your help and best wishes for the holiday season. Matt Considine On 12/24/2011 8:38 AM, William Revelle wrote: Dear Matt, Sarah and Rui, To answer the original question for creating a symmetric matrix v-c(0.33740, 0.26657, 0.23388, 0.23122, 0.21476, 0.20829, 0.20486

[R] Help creating a symmetric matrix?

2011-12-22 Thread Matt Considine
and an example of the output is below. Can anyone point me to an example that shows how to create a matrix with this sort of input? Thank you in advance, Matt require(PortfolioAnalytics) #load market index data data(indexes) #save data as a CSV write.table(indexes, C:/Rwork/indexes.csv, sep

[R] question about spaces in r

2011-12-09 Thread Matt Spitzer
confused in the future? I guess another problem I have is that I am still learning the differences between matrices and dataframes. Thanks so much, Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] R logo in eps formt

2011-12-01 Thread Matt Shotwell
See this earlier post for SVG logos: http://tolstoy.newcastle.edu.au/R/e12/devel/10/10/0112.html Using Image Magick, do something like convert logo.svg logo.eps On Thu, 2011-12-01 at 10:56 +0700, Ben Madin wrote: G'day all, Sorry if this message has been posted before, but searching for

[R] R endnote entry

2011-11-30 Thread Matt Cooper
I know citation() gives the R citation to be used in publications. Has anyone put this into endnote nicely? I'm not very experienced with endnote, and the way I have it at the momeny the 'R Development Core Team' becomes R. D. C. T. etc. Cheers. __

[R] googleVis motionchart - slow with Date class

2011-10-31 Thread Matt Pocernich
, but this didn't work? I am also wondering. is the best place to post a question about googleVis? I notice threads on stackoverflow and other places. Thanks, Matt [[alternative HTML version deleted]] __ R

[R] Matching

2011-10-29 Thread shish matt
I have a spatial weight file in csv that I want as listw object in R. The file has the following 3 variables (left to right in the file) -- OID_, NID and WEIGHTS. NID stands for the neighbors and OID_ as the origins. There are 217 origins with 4 neighbors each. I have been able to read the csv

Re: [R] contact person for UseR 2012, please?

2011-10-18 Thread Matt Shotwell
The contact person is: Stephania McNeal-Goddard email: stephania.mcneal-godd...@vanderbilt.edu phone: (615)322-2768 Vanderbilt University School of Medicine Department of Biostatistics S-2323 Medical Center North Nashville, TN 37232-2158 On Tue, 2011-10-18 at 12:41 -0400, David Winsemius wrote:

Re: [R] [Related Topic] need help on read.spss

2011-10-13 Thread Matt Shotwell
Would it be worthwhile to update the read.spss implementation using the more recent discoveries from the PSPP group? I don't mean to copy their code; but to use the ideas in their code. Is anyone working on this? I wouldn't want the effort to be duplicated. On Thu, 2011-10-13 at 16:22 +0200, Uwe

Re: [R] Rweb and setting up R on a server

2011-09-08 Thread Matt Shotwell
Erin, I haven't used Rweb recently. The URL is http://www.math.montana.edu/Rweb/ . If you have a server, you could set up the server version of RStudio: http://rstudio.org/download/server . It worked well when I tried it. Best, Matt On Tue, 2011-09-06 at 17:07 -0500, Erin Hodgess wrote

Re: [R] readBin fails to read large files

2011-09-01 Thread Matt Shotwell
On Thu, 2011-09-01 at 17:36 +0100, Prof Brian Ripley wrote: readBin is intended to read a few items at a time, not 10^9. You are probably getting 32-bit integer overflow inside your OS, since the number of bytes you are trying to read in one go exceeds 2GB. Don't do that: read say a

[R] Unusual separators

2011-08-16 Thread Matt Curcio
like 'only one byte separators can be used. I have thought about using a gsub to 'swap out' the space + tab and replace it with commas, etc but thought there might be another way. Any suggestions? M -- Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com

[R] reshape::rename package unable to install !?!

2011-08-07 Thread Matt Curcio
to reinstall 'reshape' or 'reshape2' I COULDN't. Is there a way to get over this hurdle with reshape or is there another command I can use. I am stuck because my programs up to this point used 'rename' and now I have to redo some work. M -- Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com

[R] Which is more efficient?

2011-08-04 Thread Matt Curcio
] - ttr$p.value } } } I am a novice writer of code and am interested to hear if there are any (dis)advantages to one way or the other. M Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com __ R-help@r-project.org

[R] Error message for MCC

2011-08-03 Thread Matt Curcio
- matrix(data=temp, nrow=numrows, ncol=vl) +colA - temp[,compareA] +colB - temp[,compareB] +tt - t.test(colA, colB, var.equal=TRUE) +tt_pvalue - tt$p.value + } Error in temp[, compareA] : incorrect number of dimensions -- Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com

Re: [R] Use dump or write? or what?

2011-08-01 Thread Matt Curcio
' might be a good alternative for my work. Any suggestions, M On Sun, Jul 31, 2011 at 11:41 PM, Matt Curcio matt.curcio...@gmail.com wrote: Greetings all, I am calculating two t-test values for each of many files then save it to file calculate another set and append, repeat. But I can't figure out

[R] Errors, driving me nuts

2011-08-01 Thread Matt Curcio
= paste(ttest.results., compareA, compareB, ) setwd(save_to) write.table(tt_pvalue, file=file.name, sep=\t ) Error in inherits(x, data.frame) : object 'tt_pvalue' not found # No idea?? What is going wrong?? M Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com

[R] Appending 4 Digits On A File Name

2011-07-31 Thread Matt Curcio
(kegg.subrichcdt., i, .txt, sep=) write.table(temp, file=file.name) } ### But I want: kegg.subrichcdt.0001.txt kegg.subrichcdt.0002.txt, ... Any suggestions M -- Matt Curcio M: 401-316-5358 E: matt.curcio...@gmail.com __ R-help@r-project.org mailing

Re: [R] Appending 4 Digits On A File Name

2011-07-31 Thread Matt Curcio
Hmmm... Got this error Error in formatC(i, width = 4, format = d, flat = 0) : unused argument(s) (flat = 0) Any ideas, M On Sun, Jul 31, 2011 at 1:30 PM, Matt Curcio matt.curcio...@gmail.com wrote: Greetings all, I would like to append a 4 digit number suffix to the names of my files

Re: [R] Appending 4 Digits On A File Name

2011-07-31 Thread Matt Curcio
Michael, Got it, thanks. Looking over the man file realized it is FLAG not flat. Cheers, M On Sun, Jul 31, 2011 at 2:26 PM, Matt Curcio matt.curcio...@gmail.com wrote: Hmmm... Got this error Error in formatC(i, width = 4, format = d, flat = 0) :  unused argument(s) (flat = 0) Any ideas

[R] Use dump or write? or what?

2011-07-31 Thread Matt Curcio
. ttest_results = tempfile() two_sample_ttest - t.test (tempA, tempB, var.equal = TRUE) welch_ttest - t.test (tempA, tempB, var.equal = FALSE) dump (two_sample_ttest, file = dumpdata.txt, append=TRUE) ttest_results - file.append (ttest_results, two_sample_ttest) Any suggestions, M -- Matt Curcio

Re: [R] Bootstrap

2011-07-21 Thread Matt Shotwell
In order to apply the bootstrap, you must resample, uniformly at random from the independent units of measurement in your data. Assuming that these represent the rows of 'data', consider the following: est - function(y, x, obeta = c(1,1), verbose=FALSE) { n - length(x) X - cbind(rep(1,

[R] hold position of vertices constant in network {statnet}?

2011-07-19 Thread Matt Bakker
I am a novice with network fuctions! I have been exploring the network function in the statnet package, but haven't been able to figure out how to hold vertices in position while varying edge features. Can anyone advise on whether this is possible, and if so, how to do it? Thanks! -- Matthew

Re: [R] How to capture console output in a numeric format

2011-06-24 Thread Matt Shotwell
if(exists('fout', env)) fout - rbind(get('fout', env), c(x1, x2, f)) else fout - c(x1=x1, x2=x2, f=f) assign('fout', fout, env) f } out - new.env() ans - optim(c(-1.2, 1), fr, env=out) out$fout Best, Matt On Fri, 2011-06-24 at 15:10 +, Ravi Varadhan wrote: Thank

Re: [R] How to capture console output in a numeric format

2011-06-24 Thread Matt Shotwell
On Fri, 2011-06-24 at 12:09 -0400, David Winsemius wrote: On Jun 24, 2011, at 11:27 AM, Matt Shotwell wrote: Ravi, Consider using an environment (i.e. a 'reference' object) to store the results, avoiding string manipulation, and the potential for loss of precision: fr - function(x

[R] analysing a three level reponse

2011-06-22 Thread Matt Ellis (Research)
to do it with three levels. Any pointing in the right direction greatly appreciated! Thanks Matt -- Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual

Re: [R] Elbow criterion

2011-06-20 Thread Matt Shotwell
On Mon, 2011-06-20 at 13:38 +0200, Dominik P.H. Kalisch wrote: Hi, I would like to cluster a dataset with the ward algorithm. I'm assuming that this refers to the agglomerative partitioning method [1]. That is, the number of clusters is selected according to the data partition that is

[R] Factor Analysis/Inputting Correlation Matrix

2011-06-11 Thread Matt Stati
Can someone please direct me to how to run a factor analysis in R by first inputting a correlation matrix? Does the function factanal allow one to read a correlation matrix instead of data vectors? Thanks, Matt. [[alternative HTML version deleted

Re: [R] Can we prepare a questionaire in R

2011-06-08 Thread Matt Shotwell
As Mike had written, there are frameworks for web-development with R. RApache http://www.rapache.net is one. Also, see the R package Rook: http://cran.r-project.org/web/packages/Rook/index.html . On Wed, 2011-06-08 at 17:26 +0530, amrita gs wrote: How can we create HTML forms in R Wouldn't

Re: [R] Question about curve function

2011-06-07 Thread Matt Shotwell
On Tue, 2011-06-07 at 16:17 +0200, Uwe Ligges wrote: On 07.06.2011 11:57, peter dalgaard wrote: On Jun 6, 2011, at 11:22 , Prof Brian Ripley wrote: As a further example of the trickiness, the function method of plot() relies on curve(x, ...) being a request to plot the function x(x)

Re: [R] Question about curve function

2011-06-05 Thread Matt Shotwell
I think there is trouble because expr in curve(expr) may be the name of a function, and it's ambiguous whether 'x' should be interpreted as a mathematical expression involving x, or the name of a function. Here are some examples that work: curve(I(x)) curve(1*x) On Sun, 2011-06-05 at 12:07

Re: [R] creating a vector from a file

2011-05-31 Thread Matt Shotwell
On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: Hello all, I am new to R and my question should be trivial. I need to create a word cloud from a txt file containing the words and their occurrence number. For that purposes I am using the snippets package [1]. As it can be seen at the

Re: [R] creating a vector from a file

2011-05-31 Thread Matt Shotwell
On Tue, 2011-05-31 at 16:19 +0200, heimat los wrote: On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell m...@biostatmatt.com wrote: On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: Hello all, I am new to R and my question should be trivial. I need to create

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Matt Shotwell
You can embed hex escapes in strings (except \x00). The value(s) that you embed will depend on the character encoding used on you platform. If this is UTF-8, or some other ASCII compatible encoding, \x20 will work: foo\x20bar [1] foo bar For other locales, you might try charToRaw( ) to see the

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Matt Shotwell
be read into memory, and printed like this: a\\x20b That is, not with a space character substituted for \x20. So, now I'm not sure this is a solution. On Mon, 2011-04-25 at 12:24 -0500, Matt Shotwell wrote: You can embed hex escapes in strings (except \x00). The value(s) that you embed will depend

Re: [R] Converting 16-bit to 8-bit encoding?

2011-04-21 Thread Matt Shotwell
On 04/21/2011 10:36 AM, Brian Buma wrote: Hello all- I have a question related to encoding. I'm using a seperate program which takes either 16 bit or 8 bit (flat binary files) as inputs (they are raster satellite imagery and the associated quality files), but can't handle both at the same

Re: [R] Converting 16-bit to 8-bit encoding?

2011-04-21 Thread Matt Shotwell
21, 2011 at 9:50 AM, Matt Shotwell matt.shotw...@vanderbilt.edu mailto:matt.shotw...@vanderbilt.edu wrote: On 04/21/2011 10:36 AM, Brian Buma wrote: Hello all- I have a question related to encoding. I'm using a seperate program which takes either 16 bit or 8

Re: [R] print.raw - but convert ASCII?

2011-04-19 Thread Matt Shotwell
On Tue, 2011-04-19 at 03:14 -0400, Duncan Murdoch wrote: On 11-04-18 9:51 PM, Matt Shotwell wrote: Does anyone know if there is a simple way to print raw vectors, such that ASCII characters are printed for bytes in the ASCII range, and their hex representation otherwise? rawToChar doesn't

[R] print.raw - but convert ASCII?

2011-04-18 Thread Matt Shotwell
Does anyone know if there is a simple way to print raw vectors, such that ASCII characters are printed for bytes in the ASCII range, and their hex representation otherwise? rawToChar doesn't work when we have something like c(0x00, 0x00, 0x44, 0x00). -Matt

Re: [R] integer and floating-point storage

2011-04-14 Thread Matt Shotwell
Hi Mike, There are some facilities for storing and manipulating small (2 bit) integers. See here: http://cran.r-project.org/web/packages/ff/index.html -Matt On 04/14/2011 01:20 PM, Mike Miller wrote: I note that current implementations of R use 32-bit integers for integer vectors, but I am

[R] understanding dump.frames; typo;

2011-04-12 Thread Matt Shotwell
with the -e flag, or pass the file as an argument. matt@pal ~$ Rscript dump-test.R interactive: FALSE Error in f() : dump-test-error execution continues outside of f last.dump is available matt@pal ~$ Rscript -e source('dump-test.R') interactive: FALSE Error in f() : dump-test-error Calls: source

Re: [R] Examples of web-based Sweave use?

2011-04-06 Thread Matt Shotwell
That's an interesting idea. I had written a long email describing a proof-of-concept, but decided to post is to the website below instead. http://biostatmatt.com/archives/1184 Matt On 04/04/2011 07:31 AM, carslaw wrote: I appreciate that this is OT, but I'd be grateful for pointers

Re: [R] library(foreign) read.spss warning

2011-03-26 Thread Matt Shotwell
, though I increasingly have need to import SPSS data files). Copied below are the relevant bits. -Matt From (the PSPP source file) src/data/sys-file-reader.c: enum { /* subtypes 0-2 unknown */ EXT_INTEGER = 3, /* Machine integer info. */ EXT_FLOAT = 4

Re: [R] Venn Diagram corresponding to size in R

2011-03-09 Thread Matt Shotwell
Try here: https://stat.ethz.ch/pipermail/r-help/2003-February/029393.html On Tue, 2011-03-08 at 20:25 -0500, Shira Rockowitz wrote: I was wondering if anyone could help me figure out how to make a Venn diagram in R where the circles are scaled to the size of each dataset. I have looked at

Re: [R] assignment by value or reference

2011-03-08 Thread Matt Shotwell
, Matt R version 2.12.1 (2010-12-16) Platform: x86_64-pc-linux-gnu (64-bit) container objects, such as elements of List objects and row/column objects of DataFrame objectes; but it is by value when referencing the smallest unit of element of a container object, such as cell of data frame objects

Re: [R] Rapache ( was Developing a web crawler )

2011-03-06 Thread Matt Shotwell
/Rserve framework might also be useful in other contexts, for example, to extend PHP applications (e.g. WordPress, MediaWiki). Best, Matt [1] http://biostatmatt.com/archives/1000 [2] http://biostatmatt.com/yarr/time.yarr -Matt

Re: [R] Developing a web crawler / R webkit or something similar? [off topic]

2011-03-03 Thread Matt Shotwell
://tolstoy.newcastle.edu.au/R/devel/05/11/3054.html . Though I don't know whether there was a resolution. Some suggestions were text/x-R, text/x-Rd, application/x-RData. -Matt about analyzing the html formatted document. I wish to know the frequency of a word in the document. I am only acquainted

Re: [R] Robust variance estimation with rq (failure of the bootstrap?)

2011-03-01 Thread Matt Shotwell
: Does the rq function allow the user to specify clusters/grouping among the observations? Best, Matt On Tue, 2011-03-01 at 05:35 -0600, James Shaw wrote: Matt: Thanks for your prompt reply. The disparity between the bootstrap and sandwich variance estimates derived when modeling

Re: [R] Robust variance estimation with rq (failure of the bootstrap?)

2011-02-28 Thread Matt Shotwell
estimate, but that alone isn't evidence to favor one over the other. Also, I can't justify (to myself) why skew would hamper the quality of bootstrap variance estimates. I wonder how it affects the sandwich variance estimate... Best, Matt On Mon, 2011-02-28 at 17:50 -0600, James Shaw wrote: I am

Re: [R] Visualizing Points on a Sphere

2011-02-25 Thread Matt Shotwell
phi - acos(2 * v - 1) x - sin(theta) * cos(phi) y - sin(theta) * sin(phi) z - cos(theta) library(lattice) cloud(z ~ x + y) -Matt On Fri, 2011-02-25 at 14:21 +0100, Lorenzo Isella wrote: Dear All, I need to plot some points on the surface of a sphere, but I am not sure about how to proceed

[R] Transfer function observed vs predicted values graph problem

2011-02-22 Thread Matt Coe
Hi, I am trying to make a palaeoenvironmental transfer function using the R package rioja that predicts the water-table (measured as depth to the water table) of an area given the testate amoebae that are found there. I've carried out weighted averaging of the data and am trying to produce a graph

Re: [R] Problem with writing a file in UTF-8

2011-02-21 Thread Matt Shotwell
(raw_before, raw_after) This test passes on my machine. But, there's also the question of whether these characters made it onto R-help list unaltered. Also, please include the result of sessionInfo() in you subsequent messages. Best, Matt sessionInfo() R version 2.11.1 (2010-05-31) i686-pc-linux

[R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
? Is there a better or general solution? Best, Matt sessionInfo() R version 2.12.1 (2010-12-16) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8

Re: [R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
OK, looks like my web browser does render non-ascii characters output by R when it's given the encoding explicitly. This works for me: meta http-equiv=Content-Type content=text/html; charset=UTF-8/. So that's another solution, but not a general one. -Matt On Fri, 2011-02-18 at 12:47 -0600, Matt

  1   2   3   >