Re: [R] Beginner’s Question

2017-06-11 Thread Jim Lemon
Hi Meil, Looks like the old fancy quote problem. You aren't cutting and pasting text from Word are you? Jim On Mon, Jun 12, 2017 at 11:39 AM, Neil Salkind wrote: > Please excuse the naive question but my first hour with RStudio, resulted in > this… > >> data() >> data(“women”) > Error: unexpect

[R] Beginner’s Question

2017-06-11 Thread Neil Salkind
Please excuse the naive question but my first hour with RStudio, resulted in this… > data() > data(“women”) Error: unexpected input in "data(�” So,that did not work but >data(women) without the quotes did. Would someone be so kind as to explain the function of quotes in RStudio? Thanks, Nei

[R] Keep only those values in a row in a data frame which occur only once.

2017-06-11 Thread Ashim Kapoor
Dear All, I have a file data.txt as follows: Name_1,A,B,C Name_2,E,F Name_3,I,J,I,K,L,M I will read this with: my_data<- read.csv("data.txt",header=FALSE,col.names=paste0("V", seq(1:10)),fill=TRUE) Then the file will have 10 columns. I am assuming that each row in data.txt will have at the max

[R] Memory leak in nleqslv()

2017-06-11 Thread Andrew Leach
Hello all, I am relatively new to R, but enjoying it very much. I am hoping that someone on this list can help me with an issue I am having. I am having issues with iterations over nleqslv, in that the solver does not appear to clean up memory used in previous iterations. I believe I've isolated

Re: [R] plspm package error in data frame

2017-06-11 Thread Rui Barradas
Hello, Your code throws an error before the line you've mentioned: > library(plspm) > > "Attitude" = c(1, 0, 0, 0, 0, 0, 0, 0) > > "Normative Beliefs" = c(1, 0, 0, 0, 0, 0, 0, 0) > > "Subjective Norm" = c(0, 0, 1, 0, 0, 0, 0, 0) > > "Control Beliefs" = c(1, 0, 1, 0, 0, 0, 0, 0) > > "Perceived Be

Re: [R] plspm package error in data frame

2017-06-11 Thread Bert Gunter
You need to first go through a basic tutorial to learn basic R constructs and functionality. IMHO, fooling around with special packages before you learn the basics is a bad strategy. Packages generally assume you know the basics. Some tutorial recommendations can be found here: https://www.rstudi

[R] plspm package error in data frame

2017-06-11 Thread Sarah Sinasac
Hello, I am new to R and hope I will not seem ignorant in this post. I am currently using the plspm package by Gaston Sanchez accompanied by his text book. I have attempted to create a square matrix, which has seemed successful. I used the following code: > "Attitude" = c(1, 0, 0, 0, 0, 0, 0, 0)

Re: [R] remove

2017-06-11 Thread Jeff Newmiller
The usual way I filter is: KL$Dt <- as.Date( KL$date, format='%d-%m-%y' ) KL2 <- KL[ !is.na( KL$Dt ), ] -- Sent from my phone. Please excuse my brevity. On June 10, 2017 10:17:52 PM PDT, Jeff Newmiller wrote: >You are using a slash in your format string to separate sub-fields but >your data u