Re: [R] Trouble with Slidify and Latex

2013-09-01 Thread Joshua Wiley
Hi Noah, Looks like mathjax --- \( is the inline escape for mathjax (http://www.mathjax.org/download/) As an example, checkout slide 20 (http://elkhartgroup.com/tutorials/psychometrics.html) Cheers, Josh On Sun, Sep 1, 2013 at 1:40 PM, Noah Silverman wrote: > Hi, > > (Re-submitting as the or

Re: [R] Trouble with Slidify and Latex

2013-09-01 Thread Noah Silverman
It's not in CRAN, but I still hope that someone on this list has some experience and can suggest some ideas. I will, of course, contact the author in github as well. -- Noah Silverman, C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Sep 1, 2013, at 1:4

Re: [R] Validating data type

2013-09-01 Thread Suzen, Mehmet
R is weakly typed language. I have asked similar question previously: http://r.789695.n4.nabble.com/count-appearence-of-zero-in-a-vector-td4654591.html It is advised to me to use S4 classes, if you want to enforce type checking automatically. Excellent reference on this is by the ACM award holde

Re: [R] Intersect 2 lists+bring extra columns

2013-09-01 Thread jsteimle
I see how merge works now, and to answer my own question, I can have any number of columns of miscellaneous information I want. -- View this message in context: http://r.789695.n4.nabble.com/Intersect-2-lists-bring-extra-columns-tp4675136p4675146.html Sent from the R help mailing list archive

Re: [R] Intersect 2 lists+bring extra columns

2013-09-01 Thread jsteimle
Hi A.K. That is exactly what I was hoping to do. If you have the time, can you explain what the fruit[,-1] term means in the merge? Also, if I wanted to expand the number of columns to report to include a 4th column, let's call it flavor, how would I go about doing that? J.S. -- View this me

[R] Intersect 2 lists+bring extra columns

2013-09-01 Thread jsteimle
Hi everyone, I am pretty new to R, so be patient. I am trying to intersect 2 columns and in the rows that intersect, I want information from the 3rd column to be brought with it. I think it will be easier to explain with an example example.csv

Re: [R] Intersect 2 lists+bring extra columns

2013-09-01 Thread arun
HI, If I understand it correctly: fruit<- read.csv("example.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t")  res<-merge(fruit["reference"],fruit[,-1],by.x="reference",by.y="list")  res #   reference information #1 grapefruit    pink #2  lemon  yellow #3   pear   green If th

Re: [R] lapply to multivariate function?

2013-09-01 Thread Rui Barradas
Hello, I have no experience with packages foreach and doMC. But I believe that paralel computing only pays if the datasets are really large, due to the setup time. Maybe "thousands of observations" is not that large. Rui Barradas Em 01-09-2013 22:21, Ignacio Martinez escreveu: Thanks a lot

Re: [R] lapply to multivariate function?

2013-09-01 Thread Ignacio Martinez
Thanks a lot Rui. Loops make sense to me. I made one modification to your code. I have thousands of observation, so I would like to run it in parallel. This is my reproducible example: # Make Data Frame for video actions between given times for user X DataVideoActionT <- function (userX, Time1, Ti

Re: [R] string processing(regular expressions)

2013-09-01 Thread arun
Hi,  levels(nCourse)<-gsub("^0+","",levels(nCourse))  nCourse # [1] 2A   2B   2C   7A   7B   7C   101  118A 118B 118C #Levels: 2A 2B 2C 7A 7B 7C 101 118A 118B 118C #The second part is not very clear. res<-setNames(data.frame(lapply(c("B","P","C"),function(x) paste0(levels(nCourse),x)),stringsAsFa

Re: [R] string processing(regular expressions)

2013-09-01 Thread Rui Barradas
Hello, Try the following. gsub("^0+", "", as.character(nCourse)) Hope this helps, Rui Barradas Em 01-09-2013 21:41, Robert Lynch escreveu: I have a variable that is course # nCourse <- as.factor(c("002A","002B","002C","007A","007B","007C","101","118A","118B","118C")) And I would like to ge

Re: [R] Trouble with Slidify and Latex

2013-09-01 Thread Tyler Rinker
Is there a reason not to contact the package author directly and ask him?   slidify isn't on CRAN so likely you got it from GitHub which is where you discuss package problems, particularly, a beta package's problems.  Here is the link to the issues page for slidify: https://github.com/ramnathv/sl

[R] string processing(regular expressions)

2013-09-01 Thread Robert Lynch
I have a variable that is course # nCourse <- as.factor(c("002A","002B","002C","007A","007B","007C","101","118A","118B","118C")) And I would like to get rid of the leading zeros, and have the following set ("2A","2B","2C","7A","7B","7C","101","118A","118B","118C") to paste() together with the depa

[R] Trouble with Slidify and Latex

2013-09-01 Thread Noah Silverman
Hi, (Re-submitting as the original doesn't look like it made it to the list.) Just starting to play around with the awesome Slidify package. For some reason, I can't get it to render any Latex in the presentation. Have reviews all the docs and think I'm doing things correctly. Is there someth

Re: [R] remove failure

2013-09-01 Thread Duncan Murdoch
On 13-09-01 12:46 PM, Rguy wrote: Platform: Windows 7, "R version 3.0.1 Patched (2013-06-19 r62992)" I have been running the following code (part of a larger program) for many months without problem: if ((gname %in% ls(envir=.GlobalEnv)) & !is.null(cols)) { if (!identical(cols, names(get(gn

Re: [R] lapply to multivariate function?

2013-09-01 Thread Rui Barradas
Hello, Your example doesn't really run, but for what I've seen, if your second data frame is named dat2, something along the lines of n <- nrow(dat2) res <- list("vector", n) for(i in 1:n){ res[[i]] <- with(dat2, DataVideoActionT(anon_ID[i], Time1[i], TimeM[i], TimeL[i])) } do.call(rbind,

[R] Time lag Regression and Standard Error

2013-09-01 Thread laro
Hi R Team I've got the following problem I'd like to run a time series regression of the following form Regression1: At = α + β1 * Bt + β2 * Bt-1 + β3 [(Bt-2 + Bt-3 + Bt-4)/3] + εt The B's are the input values and the A's are the output values, the subscript stands for the lag. The real Beta o

Re: [R] help

2013-09-01 Thread arun
HI, It is better to provide a reproducible example.  From the nature of the error, it looks like the problem is similar to the one in the link below: http://r.789695.n4.nabble.com/mlogit-error-td4663601.html A.K. - Original Message - From: "Haghpanahan, Houra" To: "'r-help@r-projec

Re: [R] NMDS QUESTION

2013-09-01 Thread Simona Augyte
Ok, thanks, that helps. What about running the same code on a bit of a different set of data, ex.; korma<- read.csv(text=" GR T C M B 1 0 0 0 1 2 0 1 0 0 3 1 1 0 1 4 1 0 1 1 5 0 0 0 1 6 1 0 1 1... ",sep="",row.names=1,header=TRUE) str(korma) dist(korma) korma.dist<- dist(korma) korma.mds <- iso

Re: [R] Issue with R libraries

2013-09-01 Thread Balakrishnan, Prakash Devkumar (Global Analytics)
Hi Pascal, Thanks for your response. Not sure how, I tried installing the package today and it got installed without issue. Will get in touch with you if I face any other issues. But I have explained the previous scenario and what error I received: Let me give you a clear picture what I di

[R] help

2013-09-01 Thread Haghpanahan, Houra
Hi there, I am trying to apply mlogit for a panel data set. I have 22 individuals (countries), for a 228 points in time domain, and 8 variables. I set my data in Excel in long format (I think!). I am trying to write a command to prepare data for mlogit by applying the following code. mdat<- ml

Re: [R] Issue with R libraries

2013-09-01 Thread Balakrishnan, Prakash Devkumar (Global Analytics)
Hi John Kane, Thanks for your response. Not sure how, I tried installing the package today and it got installed without issue. Will get in touch with you if I face any other issues. But I have explained the previous scenario and what error I received: Let me give you a clear picture what I

[R] remove failure

2013-09-01 Thread Rguy
Platform: Windows 7, "R version 3.0.1 Patched (2013-06-19 r62992)" I have been running the following code (part of a larger program) for many months without problem: if ((gname %in% ls(envir=.GlobalEnv)) & !is.null(cols)) { if (!identical(cols, names(get(gname, envir=.GlobalEnv remove(gname

Re: [R] lapply to multivariate function?

2013-09-01 Thread Ignacio Martinez
I hope this reproduceble example helps understand what I'm trying to do. This is the function: # Make Data Frame for video actions between given times for user X DataVideoActionT <- function (userX, Time1, Time2, Time3){ #Get data for user X videoActionsX<-subset(videoLectureActions, username

Re: [R] NMDS QUESTION

2013-09-01 Thread arun
HI, It is better to use ?dput() to show the reproducible example.  dput(korma) structure(list(T = c(0L, 0L, 1L, 1L, 0L, 1L), C = c(0L, 1L, 1L, 0L, 0L, 0L), M = c(0L, 0L, 0L, 1L, 0L, 1L), B = c(1L, 0L, 1L, 1L, 1L, 1L)), .Names = c("T", "C", "M", "B"), class = "data.frame", row.names = c("1",

Re: [R] lapply to multivariate function?

2013-09-01 Thread Bert Gunter
Oh, another possibility is ?mapply, which I should have pointed out in my previous reply. Sorry. -- Bert On Sun, Sep 1, 2013 at 8:30 AM, Bert Gunter wrote: > Rui et.al.: > > But apply will not work if the data frame has columns of different > classes/types, as appears to be the case here. Viz,

Re: [R] lapply to multivariate function?

2013-09-01 Thread Bert Gunter
Rui et.al.: But apply will not work if the data frame has columns of different classes/types, as appears to be the case here. Viz, from ?apply: "If X is not an array but an object of a class with a non-null dim value (such as a data frame),apply

[R] How to catch errors regarding the hessian in 'optim'

2013-09-01 Thread Simon Zehnder
Dear R-Users and R-Developers, in a comparison between two different estimation approaches I would like to catch errors from optim regarding the hessian matrix. I use optim with method = "L-BFGS-B" thereby relying on numerical differentiation for the hessian matrix. I do know, that the estimati

Re: [R] calculate with different columns from different datasets

2013-09-01 Thread laro
Thank you, it worked! -- View this message in context: http://r.789695.n4.nabble.com/calculate-with-different-columns-from-different-datasets-tp4674918p4675116.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] Question About Markov Models

2013-09-01 Thread Lorenzo Isella
Dear All, I am a bit struggling with the many packages for Markov models available in R. Apologies for now posting a code snippet, but I am looking for some guidance here. Please consider a set like the one below (which you can get with data<-read.csv('http://dl.dropboxusercontent.com/u/5685

Re: [R] lapply to multivariate function?

2013-09-01 Thread Rui Barradas
Hello, Maybe you need apply, not lapply. It seems you want to apply() a function to the first dimension of your data.frame, something like apply(dat, 1, fun) #apply by rows Hope this helps, Rui Barradas Em 01-09-2013 15:00, Ignacio Martinez escreveu: I have a Data Frame that contains, be

Re: [R] Blur and not readable text, using geom_text in ggplot

2013-09-01 Thread Ista Zahn
Hi Vikram, It looks like you are plotting multiple text values at the same x and y coordinates. It's not clear from your code what exactly you are trying to do; please create a reproducible example and explain what the desired result is. Best, Ista On Sun, Sep 1, 2013 at 9:06 AM, Vikram Bahure

[R] lapply to multivariate function?

2013-09-01 Thread Ignacio Martinez
I have a Data Frame that contains, between other things, the following fields: userX, Time1, Time2, Time3. The number of observations is 2000. I have a function that has as inputs userX, Time1, Time2, Time3 and return a data frame with 1 observation and 19 variables. I want to apply that function

Re: [R] NMDS QUESTION

2013-09-01 Thread Berend Hasselman
On 01-09-2013, at 15:34, Simona Augyte wrote: > Ok, thanks, that helps. > > What about running the same code on a bit of a different set of data, ex.; > korma<- read.csv(text=" > GR T C M B > 1 0 0 0 1 > 2 0 1 0 0 > 3 1 1

[R] outliers for Likert scale data

2013-09-01 Thread Helen Sawaya
Dear R experts, I have data from a questionnaire that I would like to factor analyse. It is in a likert scale form (0-3). I would like to check first for univariate and multivariate outliers but the most common ways of doing so assume the data is continuous and normal- neither of which is the ca

[R] Blur and not readable text, using geom_text in ggplot

2013-09-01 Thread Vikram Bahure
Dear R Users, I am new to ggplot. I am using geom_text to inscribe values on my ggplot but it is giving me values which are unreadable and blur. Please let me know if there is any way out. - Code - *es <- es3 + geom_text(data=tmp.cor, aes(x=2, y=min(infer.df$value

Re: [R] Packaging

2013-09-01 Thread Michael Dewey
At 08:13 30/08/2013, Eva Prieto Castro wrote: Hi, I have a problem when I try to generate the Documentation pdf (from .rda files)in Spanish during the package creation. Could you tell me the way I can do it?. Eva It would be usual to have the documentation in a file of type .Rd not .rda whi

[R] cannot install RExcel

2013-09-01 Thread Piet Heemskerk
I have followed the instructions according to: http://rcom.univie.ac.at/download.html#RExcel -- "You will have to install . a suitable version of R (I have installed R 3.0.1, CRAN Amsterdam) . a matching version of rscproxy . statconnDCOM or rcom with statconnDCOM Dow

Re: [R] NMDS QUESTION

2013-09-01 Thread Berend Hasselman
On 01-09-2013, at 00:30, Simona Augyte wrote: > I'm trying to run a very simple non-metric multidimensional scaling code on > a 8x5 character matrix. > gr T C M B > arcor 6 4 6 5 > corfo 24 21 23 24 > corma 25 15 26 17 > crust 3 2 6 5 > fil 15 12 15 15 > fol 11 9 6 8 > leat 10 11 13 13 > seag 2