similar to: vector is not assigned correctly in for loop

Displaying 20 results from an estimated 10000 matches similar to: "vector is not assigned correctly in for loop"

2012 May 31
1
possible bug in "R Editor"
Dear all, I clicked "File-New Script" to open a R Editor, typed some commands in it and then saved it to a file. If the location where I tried to save the script contained Chinese Character, R Editor complained, Error: invalid input 'E:\Some.Chinese.Characters\new_file.R' in 'utf8towcs' > sessionInfo() R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386
2011 Sep 29
1
Warning: changing locked binding for ...
Dear all, I use the R R Under development (unstable) (2011-09-28 r57099). When I load the RQDA package, it issues warnings. As the RQDA package developer, what should I deal with such message? Thank you very much. > library(gWidgetsRGtk2) Loading required package: gWidgets > library(RQDA) Loading required package: DBI Loading required package: RSQLite Use 'RQDA()' to start the
2008 Dec 31
1
Chinese characters encoding problem with XML
XML is a good tool reading data from web within R. But I wonder how could get the encoding correctly. library(XML) url <- 'http://www.szitic.com/docc/jz-lmzq.html' xml <- htmlTreeParse(url, useInternal=TRUE) q <- "//tbody/tr/td" dat <- unlist(xpathApply(xml, q, xmlValue)) df <- as.data.frame(t(matrix(dat, 4))) dt<-as.character(df[15,1]) The first column of df
2013 Mar 06
3
About basic logical operators
Hello everyone,           I have a basic question regarding logical operators. > x<-seq(-1,1,by=0.02) > x   [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78  [13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.56 -0.54  [25] -0.52 -0.50 -0.48 -0.46 -0.44 -0.42 -0.40 -0.38 -0.36 -0.34 -0.32 -0.30  [37] -0.28 -0.26 -0.24 -0.22 -0.20 -0.18 -0.16
2010 Oct 08
4
Bug in as.POSIXct regarding AM/PM
Dear All, I encounted in a problem with as.POSIXct() function. > as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p") [1] NA > as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d %I:%M:%S %p") [1] NA I have tried this in the R version 2.11.1, R version 2.10.1 and R version 2.9.2 . They all does not work. The operation system is
2017 Jun 29
1
Windows iconv() "failure" in certain locales
>>>>> Uwe Ligges <ligges at statistik.tu-dortmund.de> >>>>> on Wed, 28 Jun 2017 18:45:59 +0200 writes: > On 27.06.2017 17:36, Martin Maechler wrote: >> This is a continuation of the R-devel thread with subject >> "suggestion to fix packageDescription() for Windows users" : >> >> As I said there, a
2012 Aug 14
2
A drawing problem with R
Dear R-help mailing list, I have a drawing problem with R: I need to draw an horizontal axis with date, here is the test code: > ticks <- c("2004-01-22","2005-01-22","2006-01-22","2007-01- 22","2008-01-22","2009-01-22","2010-01-22","2011-01-22","2012-01-22") > ats <-
2017 Jun 27
3
Windows iconv() "failure" in certain locales
This is a continuation of the R-devel thread with subject "suggestion to fix packageDescription() for Windows users" : As I said there, a patch should rather address the underlying problem in packageDescription rather than a kludgy workaround patch for citation(). (For that same reason, Ben Marwick proposed to fix packageDescription() rather than the symptom seen in citation().)
2009 Sep 12
2
could not find function "Varcov" after upgrade of R?
After upgrading R to 2.9.2, I can't use the anova() fuction. It says "could not find function "Varcov" ". What's wrong with my computer? Help needed, thanks! Yao Zhu Department of Urology Fudan University Shanghai Cancer Center No. 270 Dongan Road, Shanghai, China [[alternative HTML version deleted]]
2014 Jul 28
1
Parsing and deparsing of escaped unicode characters
In both R and JSON (and many other languages), unicode characters can be escaped using a backslash followed by a lowercase "u" and a 4 digit hex code. However when deparsing a character vector in R on Windows, the non-latin characters get escaped as "<U+" followed by their 4 digit hex code and ">": > x <- "I like \u5BFF\u53F8" > cat(x) I like
2011 Apr 07
1
R 2.13.0-beta for Windows, file.copy() throws suspicious errors due to default value of copy.mode
While checking packages against R 2.13.0-beta on Windows, I have run into a few strange error messages related to copying files. The errors all relate to file.copy() and have the form of: Error in Sys.chmod(to[okay], file.info(from[okay])$mode, TRUE) : 'mode' must be of length at least one After half a day of tinkering, the best reproducible example I can come up with involves using
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2010 Mar 31
1
Weird R behaviour?
Dear list, I have observed a weird behaviour from R --- apologies if I am missing something obvious! df3f826f28 df3f826f28 Say you type in R: >c.preec <- 10074 >c.gd <- 2200 >p1 <- .2 >c.neo <- p1*9451 + (1-p1)*3883 >n.preec <- 3710 >n.gd <- 2650 >n.neo <- 2120 >n.pcos <- 53000 >unit.met <- 94 >cost.met <- 94*n.pcos >effect <-
2013 May 23
1
sample(c(0, 1)...) vs. rbinom
Greetings.? My wife is teaching an introductory stat class at UC Davis.? The class emphasizes the use of simulations, rather than mathematics, to get insight into statistics, and R is the mandated tool.?? A student in the class recently inquired about different approaches to sampling from a binomial distribution.? I've appended some code that exhibits the idea, the gist of which is that using
2017 Jun 17
2
suggestion to fix packageDescription() for Windows users
Recently I was trying to cite a package where the authors have ? and ? in their names. I found that on Windows the citation() function did not return the authors' names at all, but on Linux there was no problem (sessionInfos at the bottom): On Windows, no author names are returned: #--------------- > citation("readr") To cite package ?readr? in publications use: (2017).
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2017 Jun 17
3
suggestion to fix packageDescription() for Windows users
Hi Duncan, Thanks for your reply. Yes, it does seem to be specific to the CTYPE setting to Chinese on Windows. If I set it to English using Sys.setlocale() there is no problem, then back to Chinese and the authors disappear: Sys.setlocale("LC_ALL","English") citation("readr") #' To cite package ?readr? in publications use: #' #' Hadley Wickham, Jim
2008 Apr 09
1
simple intro to cluster analysis using R
I am looking for simple introduction to cluster analysis using R, that would be understandable to a novice in statistics. Or, could someone perhaps help me understand how to proceed in my analysis? I am very new to both statistics and R, but am trying hard to avoid having to use SPSS as everyone around me... I have dataset on people presenting their opinions on different religious
2006 May 09
1
A question about encoding
I use R 2.3.0 under windows. > Sys.getlocale() [1] "LC_COLLATE=Chinese_People's Republic of China.936;LC_CTYPE=Chinese_People's Republic of China.936;LC_MONETARY=Chinese_People's Republic of China.936;LC_NUMERIC=C;LC_TIME=Chinese_People's Republic of China.936" > localeToCharset() [1] "CP936" Now I want to use JGR,which uses UTF-8 encoding. So when I use
2008 Dec 06
1
Morlet wavelet not supportd by wavCWTPeaks
aa <- (structure(list(X.0.85 = c(-1.02, -1.17, -1.29, -1.39, -1.46, -1.5, -1.52, -1.5, -1.46, -1.39, -1.3, -1.19, -1.07, -0.93, -0.79, -0.65, -0.5, -0.36, -0.22, -0.08, 0.05, 0.18, 0.3, 0.41, 0.52, 0.62, 0.72, 0.81, 0.89, 0.98, 1.05, 1.13, 1.19, 1.25, 1.29, 1.31, 1.31, 1.29, 1.24, 1.16, 1.06, 0.93, 0.77, 0.58, 0.38, 0.16, -0.07, -0.31, -0.89, -1.05, -1.19, -1.31, -1.41, -1.47, -1.51, -1.51,