similar to: problem with for()

Displaying 20 results from an estimated 10000 matches similar to: "problem with for()"

2005 Apr 04
2
mysql retrive question
hello R-Users, I have this simple but not for me question: I do: > res<-dbSendQuery(con, "SELECT * FROM tabellaProva") > myDataFrame<-fetch(res) > myDataMatrix<-as.matrix(myDataFrame[,-1]) > namerows(myDataMatrix)<-as.character(myDataFrame[,1]) and I have: io tu io "0" "1" tu "1" "0" my problem is that the
2013 Feb 01
2
how to setdiff on lists of lists
Dear List, I have a data structure like: > aa [[1]] [1] 1 2 3 [[2]] [1] 4 5 6 > bb [[1]] [1] 3 [[2]] [1] 5 I would like to set differences between "aa" and "bb" and get as result another list of lists like: > res [[1]] [1] 1 2 [[2]] [1] 4 6 I am trying: lapply(aa, setdiff, bb) but I simply get "aa" back as result. Could you please point me in the
2011 Jan 03
4
how to invert the axes in the wireframe() plot
Dear List, I am using the wireframe function in the lattice package, and I am wondering if it is possible to invert the default axes orientation for x and y axes... what parameter should I look for? Best regards, Simone Gabbriellini
2006 Sep 12
2
coerce matrix to number
Dear List, how can I coerce a matrix like this [,1] [,2] [,3] [,4] [,5] [,6] [1,] "0" "1" "1" "0" "0" "0" [2,] "1" "0" "1" "0" "0" "0" [3,] "1" "1" "0" "0" "0" "0" [4,] "0" "0"
2012 May 07
1
wireframe and par(mfrow)
Hello List, I have some plots with the wireframe() function, and I'd like to display them in a single jpeg file. I know that par(mfrow=c(x,y)) will divide my display window in x rows and y columns, and although this works with plot(), it looks like it's not working with wireframe. here's my code: library(lattice) library(Cairo) CairoJPEG("wiley-rank.jpeg", width=960,
2008 Nov 30
4
simple question with table()
Dear List, my problem should be easy to fix, but I couldn't find a solution by myself... In my survey, there is a question with 14 possible answers. None of the respondents choose the 13th answer, so when I table() the results, R says: 1 2 3 4 5 6 7 8 9 10 11 12 14 31 52 7 21 40 7 8 2 28 2 2 1 17 13 is missing... anyone knows how to tell table() that there are 14 modalities in the
2005 May 19
2
laten class analysis
Dear List, just a little question, I am interested in Latent Class Analysis and I guess if there is a package for this pourpose thank for you help, Simone
2005 Aug 11
1
tcltk programming guide
Dear List, I'm looking for some documentation about the R tcltk package The one I found in the help doesn't look exaustive, I need information on the use of the single tk widget, maybe with some examples thank you, simone gabbriellini
2011 Apr 19
3
zero fill empty cell in data.frame
Hello List, I have a data frame like: V130 V131 V132 V133 V134 V135 V136 1 0 0 0.9 0 0.9 0 0 2 0 0 0 0 0 0.8 3 0 0 0 0 0.9 0 0 4 0.9 0 0 0 0 0 0.9 5 0 0 0 6 0 0 0 0.9 0 0 0.9 7 0 0 0.8 0 0 0 0 8 0.9 0 0 0.9 0.8 0 9 0 0 0 0.9 0.9 0 0 10 0 0 0 0 0 0 0.9
2005 Aug 29
1
Rcmdr extensions
Dear List, I am trying to extend Rcmdr with some functions usefult to my study... I have addedd succesfully a menu and some submenu to the GUI, and I have placed a file .R in the /etc folder... I am able to call functions on that file, but I cannot see the results: how can I tell Rcmdr to write the output in the output box? Second question: how can I refer to the actually selected
2011 Mar 02
2
how to simplify a data.frame and add the counts of duplicate rows as a new column
Hello List, I would like to simplify a data.frame like this columnA columnB user10 proj12 user10 proj19 user10 proj12 into something like: columnA columnB columnC user10 proj12 2 user10 proj19 1 I know unique() can simplify the data.frame, but how to count and store the duplicates? thanks in advance for any help. best regards, Simone
2008 Nov 30
1
barplot labels
Dear List, is it possible to plot vertical labels under vertical bars? for vertical labels I mean to rotate 90 degrees horizontal labels I suppose yes, because if excel can do this, R should do it twice better... thank you, Simone
2008 Nov 30
2
how to select cases based on value of one or more variables
dear list, I have read a spss file with read.spss() now I have a list with all my variable stored as vectors. is it possible to selec cases based on the value of one or more variables? thank you, Simone
2005 Apr 02
2
RMySQL question
Dear List, I have this little problem: I work with adiacency matrix like: data me you me 0 1 you 1 0 I store those matrix in a mysql database actually I use RMySQL with: res<-dbSendQuery(connection, "SELECT * FROM table") myDataFrame<-fetch(res) to retrive the table, and I have data me you 1 io 0 1 2 tu 1 0 I would like the first column to be seen
2010 Oct 20
1
how to connect to a remote PostgreSQL database from R on mac osx
Hello List, I would like to connect to a postgreSQL database on a remote server and I am wondering what is the best package to do that. I have just installed RpgSQL, RPostgreSQL, Rdbi and RODBC. The handiest to me is RPostgreSQL but I don't see how to connect to a remote server with it. For sure I can connect to remote server with RODBC, but since I am on a Mac OSX 10.6, I have quite
2009 Sep 04
3
eps file with embedded font
Dear list, I am trying to make eps file with embedded font. I use: postscript("ranking-exp-all.eps", horizontal=TRUE, onefile=FALSE, paper="special", height=8, width=12, family="Helvetica") # plot stuff dev.off() since R does not embed font, I then use: embedFonts(file="indegdistr.eps", outfile="indegdistrEMB.eps",
2009 Mar 04
1
how to estimate distribution?
Dear R-Experts, I have an empirical dataset with 150 subjects for 24 observations. In each observation, each subject can have a score in the range 0:3. I made then a simple index making the sum of the values in each row, so each subject have a score between 0 and 72. I was thinking about what kind of theoretical distribution such an index should have, so I try to make things random like:
2007 Dec 05
2
how to interpolate a plot with a logistic curve
hello, I have this simple question. This is my dataset size 1 57 2 97 3 105 4 123 5 136 6 153 7 173 8 180 9 193 10 202 11 213 12 219 13 224 14 224 15 248 16 367 17 496 18 568 19 618 20 670 21 719 22 774 23 810 24 814 25 823 I plot it with: plot(generalstats[,1], type="b", xlab="Mesi", ylab="Numero di vertici", main=""); and try to interpolate with a
2008 Nov 07
5
Agent-based social simulation and R
Do anyone know anything about the use of R for agent-based social simulation? It should be possible, and would be convenient for the simple reason that there are several nice packages containing useful stuff for SNA (Social Network Analysis). Information about packages, web sites, experienced persons in the field, etc. would be very welcome. Tom
2010 Nov 02
1
subset a data.frame
Hello List, this should be simple, but cannot figure it out. I am trying to subset a data.frame like this: > data4 users time 1 user5 2009-12-01 14:09:58 2 user1 2009-12-01 14:40:16 3 user8 2009-12-04 08:18:37 4 user6 2009-12-04 08:18:37 5 user83 2009-12-04 08:18:37 6 user82 2009-12-04 08:18:37 7 user31 2009-12-04 08:18:37 8